SolidJSS
SolidJS9mo ago
5 replies
Mr Void

createAsync unexpected behaviour when accessing route through URL, rather than within the app

https://codesandbox.io/p/devbox/pedantic-sea-9z2f4g

I have an async function which makes a network request to retrieve some data from the backend. However, it seems as if the network request isn't made (but it is, I've confirmed). When I access the URL directly from the address-bar, a request is made to the backend, response is received but the UI doesn't behave as expected. All works as expected if I access the URL from within the app, e.g by clicking a button that uses navigate().

In the sandbox, an error message should show up in the page - when directly entering the URL in the address bar. This doesn't happen, unless the URL is accessed from within the app, using the link "book" at the top.

Why is that happening?
Screenshot_2025-05-03_at_07.21.51.png
Screenshot_2025-05-03_at_07.21.43.png
Was this page helpful?