How can I circumvent the wrapping Router requirement error?
I have a ui library that lives in a monorepo with my core application. I'm structuring a lot of component in the ui package so that it can be shared across projects. I have a header and footer inside that library that wants to use utilities that require solid-router ie. <A> specifically.
Since UI isn't directly wrapped in a router context it errors. Curious to know if anyone has any suggestions to get around this and ship the components without that will eventually be used within a router context?
10 Replies
Since UI isn't directly wrapped in a router context it errors.Why would the UI lib error? It's up to the user to wrap the app with a router before using the library, no?
That was my assumption as well but it’s complaining regardless. I’m investigating if it’s the monorepo setup
it might be the "multiple instances of solid" problem
….it would have given us trouble in other places in that case
unles reactivity works fine?
It does yeah
Then maybe some of the <A> components are being used outside of the router?
Nope they are all within the scope of the app under router
If you have stackstace of that error you could try to inspect the sources for some leads
That will be my next path for investigation
Will report back