NesCafe
NesCafe
SSolidJS
Created by Seventimes<3 on 7/28/2023 in #support
Converting code to ES5
sometimes it can happen. for example for apps I develop at work in our organization there are very old machines. some running win XP and no way to install latest browsers there. though (with firefox) they support part of modern JS api, like let and Map, Set but it thowed me errors for something I made with Vue (I guess shadowRoot. I just defined some object to window to suppress those. because none of my components use that feature, it is just Vue internals have checks)
11 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
wow
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
the only thing that can change it is use of base tag in page header
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
from my experience if you call a fetch with some absolute url but without specifying protocol and domain it should just grab it from the current address
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
btw you can check network tab in browser devtools
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
ah ok so this code is from an example
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
actually... is that response type not a Promise also? because you made await there... const response = await fetch
10 replies
SSolidJS
Created by haikesikejiqiang on 7/22/2023 in #support
How should I use createRouteData
I dont know much, but maybe because this function is async async ([slug, page]) => { it expects return value to be a Promise. but currently there is return (await response.json()); maybe try to just return json?
return response.json();
return response.json();
10 replies
SSolidJS
Created by etnbrd on 7/19/2023 in #support
How to add derived values in store after creation
but I tried it with new property ah I got it. need to use count.derived.memoDerived.get to access it
10 replies
SSolidJS
Created by etnbrd on 7/19/2023 in #support
How to add derived values in store after creation
@etnbrd wooow... this way also works:
setCount("memoDerived", () => memo)
setCount("memoDerived", () => memo)
10 replies
SSolidJS
Created by etnbrd on 7/19/2023 in #support
How to add derived values in store after creation
hmm, I tried to do similar stuff in playground, did not work...
const memo = createMemo(() => count.primary + 3);
setCount({
memoDerived: {
get get() {
return memo();
}
}
});
const memo = createMemo(() => count.primary + 3);
setCount({
memoDerived: {
get get() {
return memo();
}
}
});
but this way worked (I know maybe set store inside effect is not very good, but why not if it is working)
createEffect(() => {
setCount("memoDerived", memo());
});
createEffect(() => {
setCount("memoDerived", memo());
});
10 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
oh, good. will check it tomorrow. I'm from the phone already
23 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
I must mention that there are two ways for modify array inside store. one is with produce helper. second is with setArticles setter by key
23 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
ah, that what I wanted - to know what change it was performed with items. maybe you can change the code in a playground to make it move 1st element to 7th index
23 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
I mean it is working. but in your first message you mentioned that in your app it was not updating memo correctly
23 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
btw, memo-s are usually lazy. they will not call by themselves. only effects will
23 replies
SSolidJS
Created by Bersaelor on 7/10/2023 in #support
Make createMemo depend on unmentioned signal
@bersaelor how come this does not work? can you check this playground code? https://playground.solidjs.com/anonymous/70394ed3-1bc5-4810-af96-3cb72ba6f396
23 replies