Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Redux] Reducer action and functions names #3

Open
furdzik opened this issue Jun 7, 2021 · 2 comments
Open

[Redux] Reducer action and functions names #3

furdzik opened this issue Jun 7, 2021 · 2 comments
Labels
recommendation Recommendation of solution STYLE GUIDE: redux and store Style guide for redux and store

Comments

@furdzik
Copy link
Owner

furdzik commented Jun 7, 2021

[PROPOSITION 1] ✔️

  • For action function name suffix Action e.g. const getDicrionariesAction = () => ...
  • For functions i reducers without suffix e.g. const getDicrionaries = () => (dispach) => ...
  • For API functions: use words like fetch, update, delete etc. e.g. const fetchDicrionaries = () => ...
@furdzik furdzik added the STYLE GUIDE: react Style guide for React label Jun 7, 2021
@furdzik
Copy link
Owner Author

furdzik commented Jun 8, 2021

[PROPOSITION 2]

Alternatively: onFetchDicrionaries as function
fetchRevisions{Success} when {Success} or {Error}

@furdzik furdzik changed the title [React] [Proposition] Reducer action and functions names [React] Proposition / Reducer action and functions names Jul 23, 2021
@furdzik furdzik added the proposition Proposition of a solution label Jul 23, 2021
@furdzik furdzik changed the title [React] Proposition / Reducer action and functions names [React] Reducer action and functions names Jul 25, 2021
@furdzik furdzik changed the title [React] Reducer action and functions names [Redux] Reducer action and functions names Jul 25, 2021
@furdzik furdzik added STYLE GUIDE: redux and store Style guide for redux and store and removed STYLE GUIDE: react Style guide for React labels Jul 25, 2021
@furdzik
Copy link
Owner Author

furdzik commented Jul 26, 2021

[RECOMENDATION]

For action function name sufix Action e.g. const getDicrionariesAction = () => ...
For functions i reducers without sufix e.g. const getDicrionaries = () => (dispach) => ...
For API functions: use words like fetch, update, delete etc. e.g. const fetchDicrionaries = () => ...

TODO:

  • Add a lot of examples

@furdzik furdzik added recommendation Recommendation of solution and removed proposition Proposition of a solution labels Jul 26, 2021
@furdzik furdzik changed the title [Redux] Reducer action and functions names [Redux and store] Reducer action and functions names Nov 11, 2021
@furdzik furdzik changed the title [Redux and store] Reducer action and functions names [Redux] Reducer action and functions names May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recommendation Recommendation of solution STYLE GUIDE: redux and store Style guide for redux and store
Projects
None yet
Development

No branches or pull requests

1 participant