How to define constants in React?
You can use ES7 static field to define constant.
1 2 3 | class MyComponent extends React.Component { static DEFAULT_PAGINATION = 10 } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.