createStoreObject(objectShape)

An alias for combine({field: storeA, another: storeB}). See combine

Arguments

  1. objectShape (Object)

Returns

(Store): An object that holds the state tree. There can be multiple stores.

Example

import {createStore, createStoreObject} from 'effector'
const balance = createStore(0)
const username = createStore('zerobias')
const root = createStoreObject({balance, username})
root.watch(data => console.log(data)) // {balance: 0, username: 'zerobias'}