Raqueebuddin Aziz
Raqueebuddin Aziz
SSolidJS
Created by Mr Void on 9/29/2024 in #support
disable untrack when param changes
secondly, using createEffect to set a signal is not best practice, you should create a derived signal if possible
5 replies
SSolidJS
Created by Mr Void on 9/29/2024 in #support
disable untrack when param changes
then update the writable memo in your editor untill the thing is saved, once the thing is saved update your params
5 replies
SSolidJS
Created by Mr Void on 9/29/2024 in #support
disable untrack when param changes
I think what you need is ephemeral state, check this out: https://primitives.solidjs.community/package/memo/#createwritablememo Basically in your editor create a writabl memo like createWritableMemo(() => props.data) and remove the untrack from
<Editor
// untracking to avoid bug in editor whenever data is autosaved
// however, this needs to be updated when URL param changes
data={currentNote()?.data}
/>
<Editor
// untracking to avoid bug in editor whenever data is autosaved
// however, this needs to be updated when URL param changes
data={currentNote()?.data}
/>
5 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
Thanks appreciate all the help. I think I have the solution now
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
I guess I can run decrypt onMount seems like the easiest way
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
The issue happens with memo as well so don't think its related to async specifically
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
Yes
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
I tried sync code with createMemo and it has same issue, maybe this is intentional behaviour, or a bug that got slipped not sure
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
if I understand correctly, createAsync is just supposed to be createMemo but with async function support and they track deps only before the first yield to the event loop
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
I don't think that's the issue since all async functions return a promise and I need a lot of it to be inline because I want to track upstream dependencies like appContext.path in the original code
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
is it intended or a bug
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
appreciate that, but what is the reason for the discrepancy b/w the UI and the console.log anyways?
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
also appreciate all the help 🙂
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
also do I need to clientOnly where the data is consumed or the component where the createAsync call happens
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
or does the data still prefetch with client only
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
decrypting on the server means sending user private keys to server which breaks the zero trust model, so in solid start there is no way to server side prefetch the encrypted data and decrypt it on client?
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
getboards return same data, its the data processing that's different, how would you do client side decryption with SSR support? I don't wanna use revalidate like your example since its not actually invalid the encrypted data remains same
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
the actual UI should be 20,21,22 since thats what decrypted is in client
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
yes but look at browser console, it shows 20,21,22 but the UI doesn't
29 replies
SSolidJS
Created by Raqueebuddin Aziz on 8/30/2024 in #support
createAsync not updating UI on client
note the issue is only on ssr load, if you save a file and hmr triggers, then it'll show right values
29 replies