enBloc-org / kindly

GNU General Public License v3.0
17 stars 22 forks source link

#236/conversation context refactor #238

Closed nichgalzin closed 3 months ago

nichgalzin commented 3 months ago

Description

Closes #236
This PR involves a refactor of the conversation context to follow the switch statement useReducer pattern. The goal of this was to centralise the state manipulation logic in anticipation of growing project complexity and to set a pattern for future context setup and use.

The main change of this is replacement of all set state actions with a dispatch action and all state related manipulation moved to the conversationStore file.

Files changed

Tests

Although this PR contains no new tests, it anticipates the future adoption of Jest for unit testing as this refactor will hopefully greatly simply that process.

netlify[bot] commented 3 months ago

Deploy Preview for cool-creponne-3e1272 ready!

Name Link
Latest commit 90430889f6156b0344893dea2638ce5f90d01c3b
Latest deploy log https://app.netlify.com/sites/cool-creponne-3e1272/deploys/6666d0e84529070008b5d706
Deploy Preview https://deploy-preview-238--cool-creponne-3e1272.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.