-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The plugin I envisioned should be simple and easy to use
import { proxy } from "valtio-plugin"
import { subscribe, ... } from "valtio/vanilla"
import { devtools } from 'valtio/utils';
function plugin(options) {
return (state) => {
// init
// subscribe(change)
// ...
return () => {} // dispose(optional)
}
}
proxy.use(globalPlugin({...}))
const instance = proxy.createInstance()
instance.use(plugin)
const state = instance({...})
devtools(state)I know this will lose a lot of state handling, but the question is, do we need so many methods
I noticed that many interception operations have been implemented in the source code. Will this affect the stability of the framework?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels