React Core & Hooks (407 Qs)•Part 9: React Hooks Deep Dive (262 - 316)
How to define constants in React?
mid LevelCode ExampleHooks
You can use ES7 static field to define constant.
javascript
class MyComponent extends React.Component {
static DEFAULT_PAGINATION = 10;
}