Comments (3)
Yeah.. good call. The wording on the error doesn't make sense anymore. That being said I wonder what would make sense. Because it is the same thing it has always been. And its generic, for whenever you use something that reads from the Router context outside of the router.
"Cannot find Router context"
"<A> and 'use' router primitives can be only used inside a Route"
from solid-router.
Since 0.10
only <Route>
components are allowed as children of <Router>
. All other components that uses router context (like <A>
) need to either be in a route component OR the component passed to the Router root
prop.
from solid-router.
Since
0.10
only<Route>
components are allowed as children of<Router>
. All other components that uses router context (like<A>
) need to either be in a route component OR the component passed to the Routerroot
prop.
Thats fine. I just find that the error message is not accurate. If thats the case then the error message should include something along those lines for better feedback. Saying "Make sure your app is wrapped in a Router" feels like it may have been an old error message that doesn't really apply anymore.
from solid-router.
Related Issues (20)
- [Bug] MemoryRouter - `set()` can't change the page
- `useLocation().state` does not get updated on history back HOT 1
- [Bug?]: Unable to use `ErrorBoundary` when throwing Error from cached function in combination with `load` HOT 5
- action always trigger on form submit
- Slow performance matching route with localeCompare HOT 2
- Route load results in inconsistent revalidation behaviour HOT 2
- Why not just export useRouter and useRoute? HOT 2
- Error: <A> and 'use' router primitives can be only used inside a Route. HOT 3
- SSR no matching exports HOT 1
- location.state undefined with HashRouter on v0.13.3 HOT 4
- useIsRouting returning true from SSR and causing Suspense issues HOT 2
- HTML anchors with unicode id hash could not trigger page jump HOT 2
- A component isActive subpath match incorrect
- `useCurrentMatches` is not reactive
- Crash when server function throws redirect and wrapped in createAsync HOT 3
- `window.location` holds incorrect value on initial client-side render HOT 1
- Actions called in onMount (or first run effect) are destroyed by start process, and do not receive values nor errors HOT 4
- In the new version, Route is imported as a type rather than a method. HOT 3
- Returning `never` from `redirect` function makes incorrect behavior HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solid-router.