Signal cross bound a route
Hi, I'm new to Solidjs, I wonder if there's a way to make a solid-router to cross bound a signal?
I try to make a emails client app, let's say I have folders for: inbox, sent, trash, later
those folders are router link and I have emails list, each email is organized in multiple folders,
my signals are lifted in the app component like the following:
I need to change the current folder whenever the folder changes in the route and vice versa.
4 Replies
I tried to but it always returns
undefined
folderp
will not be reactive
make it a function if you want to use it like that
const folderp = () => useParams().folder
Thank you, I'll try it @._rb
I'm seeing different behavior between config based routing and regular routing, thank you @._rb and @draw.uy
your console log will also not be called so you will only see the first value because components in Solid are not rerun. If you want to log a reactive value use an effect.