React hooks

Hooks are a new way of creating stateful components without classes. you can use hooks only on the body of the components or the body of other hooks and you cannot use them on helper functions or inside other functions.

Environment-specific config in React

If we want to have different settings based on the environment (development, test, production) we can leverage environment variables. However, if we bootstrapped our React application using "Create-react-app" command, we don't have access to the Webpack for the fully customised build. Instead, we can define variables in our NPM scripts and in our code we can test those variables and implement different functionalities.