Problem
Expensify/App, Onyx, and our JS styles are inconsistently enforced in the Expensify/App repo. This can happen for many reasons, but one obvious one is that we just haven't written down in our style guide clear examples.
Why is this important?
Incorrect patterns will create more incorrect patterns and general confusion about the "right way" to make a change or implement a feature. Every Expensify contributor should ideally have what they need to be able to champion our code styles and philosophies when reviewing any contribution (internal or external). But this can be difficult without a clear guide to refer to.
Solution
Let's do a quick audit of various things that need clarification and clean them up by creating an issue for each best practice.
The assignee will:
- Figure out why we have chosen to do things this way
- Update the style guide with a clear explanation and make sure that it can easily be linked to (if necessary)
- Update the
Expensify/App codebase to eliminate any inconsistencies
Here's a list of things that need to be addressed and can be broken out into other issues:
Feel free to suggest other things to this list!
Problem
Expensify/App, Onyx, and our JS styles are inconsistently enforced in the
Expensify/Apprepo. This can happen for many reasons, but one obvious one is that we just haven't written down in our style guide clear examples.Why is this important?
Incorrect patterns will create more incorrect patterns and general confusion about the "right way" to make a change or implement a feature. Every Expensify contributor should ideally have what they need to be able to champion our code styles and philosophies when reviewing any contribution (internal or external). But this can be difficult without a clear guide to refer to.
Solution
Let's do a quick audit of various things that need clarification and clean them up by creating an issue for each best practice.
The assignee will:
Expensify/Appcodebase to eliminate any inconsistenciesHere's a list of things that need to be addressed and can be broken out into other issues:
Onyxdirectly inside a view #5998compose()with only a single method #6000displayNameproperties so that functional components all have it and class components do not #6002propTypesimports not usIng camelCase #6004_#5989import * as Somethingwhen modules only have named exports #6072Onyx.merge()overOnxy.set()except for when absolutely necessaryFeel free to suggest other things to this list!