
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Observable state with ease. ⚡️
Bring your React components to the next level. ⚛️
auto/useAuto/withAuto functions)watch function)o/useDerived functions)
Why build this? The goal of this library is to explore the MobX approach of writing React components by designing a new API from the ground up with React in mind from the get-go. Another goal is to keep a lean core by writing an observability engine from scratch.
Who built this? Alec Larson, the co-author of
react-spring and immer. You can support his work by becoming a patron.
o() for making observable objectsauto() for reactive effectswhen() for reactive promisesno() for unobserved objectsnoto() for unobserved scopeswatch() for listening to deep changesshallowChanges() for listening to shallow changeswithAuto() for reactive componentsuseAuto() for easy auto calls in componentsuseO() for observable component stateuseDerived() for observable gettersuseChanges() for change listenersuseEffects() for reactive mounting/unmounting of effectsuseBinding() for situations where withAuto is too invasiveThe API reference can be found here:
https://github.com/alloc/wana/wiki/API-Reference
Many of wana's exports are tree-shakeable. 🌲
@wana/babel-plugin-with-auto
For development only. It ensures that withAuto components appear in the "component stack" printed by React when an error is thrown while rendering. This makes debugging a lot easier, but also inflates the size of your application. This plugin produces broken code when used on a production bundle, because it relies on an API that exists only in development.
@wana/babel-plugin-add-react-displayname
A fork of babel-plugin-add-react-displayname that works with Babel 7 and up. It also provides a callees option, which means HOCs like withAuto are supported. Basically, this plugin sets the displayName of your components for you, which makes React Devtools a better experience. It's recommended to use this plugin in both development and production.
If you love this library, please donate! I have no income currently, because I'm working full-time on a startup. Any amount is greatly appreciated. 🥰
FAQs
Easy observable state for React
The npm package wana receives a total of 34 weekly downloads. As such, wana popularity was classified as not popular.
We found that wana demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.