Iterating routes don't work

For some weird reason the code in this image doesn't work as expected
7 Replies
Alex Lohr
Alex Lohr2y ago
map will break solid's reactivity. Better use <For each={routeArray}>
shogun2077
shogun2077OP2y ago
That doesn't work either That was my initial attempt
thetarnav
thetarnav2y ago
it should work fine I think, what's routeArray?
shogun2077
shogun2077OP2y ago
const routes = new Map([['/', HomeComponent]])
const routesArray = Object.entries(routes)
const routes = new Map([['/', HomeComponent]])
const routesArray = Object.entries(routes)
thetarnav
thetarnav2y ago
thetarnav
thetarnav2y ago
it should be like this I guess
shogun2077
shogun2077OP2y ago
Thanks Yup that workds
Want results from more Discord servers?
Add your server