SolidJSS
SolidJSโ€ข3y agoโ€ข
3 replies
mb21

useReducer vs createReducer

Hello! What are the pros and cons of

1. the useReducer in the tutorial (https://www.solidjs.com/tutorial/stores_immutable -> scroll down in the left pane), vs
2. createReducer from @solid-primitives/reducer

1) is built on createStore while 2) is built on createSignal (source)

If I'd want to put a normal JS object with a couple of fields in it to store some state... which one is recommended? thanks!
Was this page helpful?