You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// HydrateAtoms.tsximporttype{Component,JSXElement}from'solid-js'import{useHydrateAtoms}from'solid-jotai/utils'/** @doc https://jotai.org/docs/guides/initialize-atom-on-render */constHydrateAtoms: Component<{initialValues: Parameters<typeofuseHydrateAtoms>[0]children: JSXElement}>=(props)=>{// initialising on state with prop on render hereuseHydrateAtoms(props.initialValues)returnprops.children}exportdefaultHydrateAtoms
Using eslint-plugin-solid, I get:
11:10 warning The reactive variable 'props.children' should be used within JSX, a tracked scope (like createEffect), or inside an event handler function, or else changes will be ignored solid/reactivity
How should it be fixed?
The text was updated successfully, but these errors were encountered:
With the original implementation (https://jotai.org/docs/guides/initialize-atom-on-render), I created:
Using
eslint-plugin-solid
, I get:11:10 warning The reactive variable 'props.children' should be used within JSX, a tracked scope (like createEffect), or inside an event handler function, or else changes will be ignored solid/reactivity
How should it be fixed?
The text was updated successfully, but these errors were encountered: