ankita1010 / react-combine-reducers

85 stars 11 forks source link

Provide working example? #4

Closed Ahmdrza closed 4 years ago

Ahmdrza commented 4 years ago

I am trying to use this in my project but this isn't working as expected. Not sure whats the issue. Can you provide any working example with a link?

ankita1010 commented 4 years ago

Hi @Ahmdrza

I have created a demo application which uses React's useReducer hook and passed the state and dispatch using the content API and useContext hook.

The reducer provided is split into two reducers for modularity and later combined using the helper function provided by react-combine-reducers, according to the instructions provided.

I would request you to take a look at the repository link I have provided along with this email. Give special emphasis to the context folder and Details.js component.

Repo link: https://github.com/ankita1010/react-hooks-multi-reducers Instructions to run the application: Go to the root folder and the the following commands:

$npm install

and

$npm start

Thanks, Ankita

Ahmdrza commented 4 years ago

@ankita1010 Thanks :)