Skip to main content
InterviewHubPRO
Section Overview
Q363

Question 363 of 407

Part 9: React Hooks Deep Dive (262 - 316)

89%
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;
    }