ATA noob
Stop infinite recursion when updating state
I need to update a store using it's previous value inside a createEffect.
I am using
import { useKeyDownEvent } from "@solid-primitives/keyboard";
to handle keyboard inputs.
i have a store
Now according to the docs , I am doing this https://primitives.solidjs.community/package/keyboard#usekeydownevent:
This is causing an infinite loop, since the value update of showChat is retriggering the createEffect.
Is there a way to read current value of UserSettingsStore.showChat in a non-reactive way, ie. prevent it from triggering infinite loop6 replies
Ideal way to load settings/configs
Suppose I have a bunch of settings like user preferences (dark mode), or configs which I load using an API, How should I save and load these settings on start.
Should I just save these settings in localstorage, and then use onMount() in the main App component to set the signals for all my configs? Or is there some better way?
2 replies
Is this Firebase Context correct?
I got this code online but not sure about it. Will the values come to me reactively. I'm worried that if I have a few protected(authenticated) routes, and firebase auth is still loading, then my user will get redirected to login page.
3 replies
Configure Background for routes
I have a solid app where I want to change my background images dynamically based on which route/page it is.
How can I configure bg1.png to automatically change based on which route is used.
Should i create a global backgroundSignal, then use the Route."load" property to set the backgroundSignal to the current background. Then put the img in a switch to update when backgroundSignal changes?
4 replies