Skip to content

Instantly share code, notes, and snippets.

@stwiname
Last active May 28, 2018 00:29
Show Gist options
  • Save stwiname/18f362d2250dbc06629ecc49f5e93b0b to your computer and use it in GitHub Desktop.
Save stwiname/18f362d2250dbc06629ecc49f5e93b0b to your computer and use it in GitHub Desktop.

Breif

To remember the user we will store a boolean as a string in AsyncStorage

It then needs to be loaded and set in redux state as well

Current practices

This is the most up to date way we do things

Actions

https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/actions/edit-message.ts

Reducers

Should all use the reducer builder, everything should be typed https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/reducers/edit-message.ts

Update the State type: https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/reducers/index.ts#L16-L24

Sagas

Everything should sit in a "flow" saga like https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/sagas/edit-message.ts#L6

It can then be started like here https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/sagas/full-app.ts#L397

Selectors

https://github.com/dn3010/sylo-mobile/blob/dapp-development/src/selectors/editMessage.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment