Scope | Needs to trigger rerender on change | Mutability | You should use... |
---|---|---|---|
Local | No/never changes | Any | Local constants/variables |
Local | Yes | (Locally) Immutable | Props |
Local | Yes | Mutable | State |
Global | No/never changes | Any | Constants/variables in a module, imported where required |
Global | Yes | Mutable | Context |
Ps: The current setup was done on 01-04-19
Project Dependency Versions at the time 👇
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3",
"typescript": "^3.2.2"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",