
import createStore from "./createStore"

const models = {
  person: {}
}

const store = createStore(models)

export default store;

export function useModel(modelName) {
  const state = store.getState(modelName)
  const update = (value) => {
    store.updateState(modelName, value)
  }

  return [state, update]
}
