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
useAsImmutable detects when any sub-ordinate properties are changed but not when the property itself changes.
For example:
const news = observable({ topics: ["politics", "tech", "cooking"], results: "" }); const App = observer( function App () { useLayoutEffect( () => { news.results = news.topics.join(","); }, [useAsImmutable(news.topics)] ); return (<div>{news.results}</div>); });
Adding a new new topic will work as expected and fire the effect but replacing news.topics with a new array is not detected.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
useAsImmutable detects when any sub-ordinate properties are changed but not when the property itself changes.
For example:
Adding a new new topic will work as expected and fire the effect but replacing news.topics with a new array is not detected.
The text was updated successfully, but these errors were encountered: