Yomguithereal / baobab-react

React integration for Baobab.
MIT License
309 stars 38 forks source link

Who to combine segmented baobab tree #130

Open carlosdelfino opened 5 years ago

carlosdelfino commented 5 years ago

I'm learning Reac, both JS and Nactive, and was studying its use with Redux, until I met Baobab which for me is a lot better.

I'm missing an existing feature in Redux, which allows me to track my state tree, but in the same way that segment does not reduce the Reduces in files and I combine all functions of the combineReduces function.

but I would like to make such a combination with the state trees, so that I can follow them, for example:

const initialCallState = baobab({ chamados: [], paciente: null, agendamento: null });

const initialClockState = baobab({ dateClock: new Date(), locale: 'pt-BR', });

const initialWebServeState = baobab({ server: null, connected: null });

// here I combine all Baobab const initialState = baobab({ clock: initialClockState, video: initialVideoState, webService: initialWebServeState, call: initialCallState });