Willi
Willi
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
Oh man, you are absolutely correct! That was the issue, the versions didn't match. I switched from 1.8.1 to 1.8.15 and pinned the router to 0.13.1
https://esm.sh/@solidjs/[email protected]
https://esm.sh/@solidjs/[email protected]
Thanks for the help
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
Alright, I'm gonna wait a bit for other people on discord, and maybe file an issue on the repo and see what people have to say there. But thank you so much for your time mate!
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
Didn't actually try that, whoops. But I did now, and no, url changes do not invoke another log
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
function MDXContent(props)
length: 0
name: "MDXContent"
prototype: Object { … }
prototype>: function ()
function MDXContent(props)
length: 0
name: "MDXContent"
prototype: Object { … }
prototype>: function ()
I got two log messages, one undefined, and then this output. Oh, so wrapping the read in an arrow function turns it into a signal? Interesting, thx
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
No worries :D
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
const [mdxc] = createResource(() => params.path, async (path) => {
const response = await fetch("/" + path);
const [mdxc] = createResource(() => params.path, async (path) => {
const response = await fetch("/" + path);
Thanks for the suggestion! I changed the code based on it like this, but It still does not change the behaviour. What do you mean by me needing to use a signal?
20 replies
SSolidJS
Created by Willi on 4/6/2024 in #support
Struggling with Router useParams() reactivity
import { render } from "https://esm.sh/[email protected]/web";
import { HashRouter, Route, useParams } from "https://esm.sh/@solidjs/router";
import h from "https://esm.sh/[email protected]/h";
import { createResource, createEffect } from "https://esm.sh/[email protected]";
import remarkGfm from "https://esm.sh/remark-gfm@4?bundle";
import remarkMath from "https://esm.sh/remark-math@6?bundle";
import { evaluate } from "https://esm.sh/@mdx-js/mdx@3?bundle";
import * as runtime from 'https://esm.sh/[email protected]/h/jsx-runtime';
import { render } from "https://esm.sh/[email protected]/web";
import { HashRouter, Route, useParams } from "https://esm.sh/@solidjs/router";
import h from "https://esm.sh/[email protected]/h";
import { createResource, createEffect } from "https://esm.sh/[email protected]";
import remarkGfm from "https://esm.sh/remark-gfm@4?bundle";
import remarkMath from "https://esm.sh/remark-math@6?bundle";
import { evaluate } from "https://esm.sh/@mdx-js/mdx@3?bundle";
import * as runtime from 'https://esm.sh/[email protected]/h/jsx-runtime';
Here are the missing imports!
20 replies