We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index
snapshot.loading
Content
state .message
const state = proxy({ loading: true, message: "" }); function Index() { const snapshot = useSnapshot(state); const Node = snapshot.loading ? Loading : Content; useEffect(() => { console.log("Log Index Rerendering"); }); useEffect(() => { state.loading = false; }, []); return <Node />; } function Loading() { return <>loading</>; } function Content() { useEffect(() => { //If this is added,Index Rerendering 3 times state.message = "welcome"; //If this is removed,Index Rerendering 2 times //state.message = "welcome"; }, []); return <>test</>; }
The text was updated successfully, but these errors were encountered:
Please continue discussion in #716.
Sorry, something went wrong.
No branches or pull requests
Index
component only accesssnapshot.loading
Content
component only setstate .message
Index
component Rerendering 3 times, My understanding should be 2 timesThe text was updated successfully, but these errors were encountered: