var Jotai = { ...jotaiReact, ...jotaiVanilla }
let i = 0;
const nextId = () => `${++i}`
const jotaiStore = Jotai.createStore()
const jotaiAtom1 = Jotai.atom(0)
const jotaiAtom2 = Jotai.atom((get) => get(jotaiAtom1) + 1)
jotaiAtom1.debugLabel = nextId()
jotaiAtom2.debugLabel = nextId()
jotaiStore.sub(jotaiAtom2, () => {})
const updateJotai = () => jotaiStore.set(jotaiAtom1, jotaiStore.get(jotaiAtom1) + 1)
const recoilAtom1 = Recoil.atom({
key: nextId(),
default: 0,
});
const recoilSelector = Recoil.selector({
key: nextId(),
get: ({get}) => get(recoilAtom1) + 1
})
function Test() {
const setVal = Recoil.useSetRecoilState(recoilAtom1);
return React.createElement('button', { id: "recoil-updater", onClick: () => setVal(val => val + 1) })
}
let updateRecoil
ReactDOM.render(React.createElement(Recoil.RecoilRoot, {}, React.createElement(Test)), document.getElementById('recoil-root'), () => {
const el = document.getElementById('recoil-updater')
updateRecoil = () => el.click()
})
const zeduxAtom1 = ZeduxReact.atom('1', 0)
const zeduxAtom2 = ZeduxReact.ion('2', ({ get }) => get(zeduxAtom1) + 1)
const ecosystem = ZeduxReact.createEcosystem()
const instance1 = ecosystem.getInstance(zeduxAtom1)
const instance2 = ecosystem.getInstance(zeduxAtom2)
instance2.store.subscribe(() => {})
const updateZedux = () => instance1.setState(state => state + 1)