Closed
Description
Reproduce demo: https://codesandbox.io/s/goofy-framework-v0tjf?file=/src/App.js
When config is a initialValue reference as useState, modify config doesn't update content. should we implement this feature?
// after changing config to 2, the content is not update.
// const config = 1
const config = 2
function App() {
const [state] = useState(config)
return <div>{state}</div>
}
anther possible usage:
function App() {
// after changing config to 2, the content is update.
// const [state] = useState(1)
const [state] = useState(2)
return <div>{state}</div>
}
Metadata
Metadata
Assignees
Labels
No labels