Let’s know something about ReactJS

01.Using Props
‘props’ is a special keyword that stands for properties and used for passing data between components in ReactJS. There are some ways to define props in JSX.

02.Why you need JSX?
JSX allows us to write HTML elements in JavaScript and place them in the DOM without any createElement() and appendChild() methods. JSX converts HTML tags into react elements. It makes it easier and faster to write templates if you are familiar with HTML.

03.What is the lifecycle method in ReactJS?
React lifecycle methods are the series of events that happen from the birth of a React component to its death. Every component in React goes through a lifecycle of events. I like to think of them as going through a cycle of birth, growth, and death. Lifecycle methods execute in the initial rendering or re-rendering phase.

04.Why you need unit testing?
Unit testing helps to make sure the code works correctly. Unit tests are a great way to do regression testing: simply run them every time you change something and make sure nothing breaks. Spotted a bug? Fix it and write a unit test to make sure it doesn’t happen again. For your identified important parts of code, you need to write unit tests to make sure the code works.

05.Things about Instance Properties
this.props contains the props that were defined by the caller of this component. In particular, this.props.children is a special prop, typically defined by the child tags in the JSX expression rather than in the tag itself.
The state contains data specific to this component that may change over time. The state is user-defined, and it should be a plain JavaScript object.
If some value isn’t used for rendering or data flow we don’t have to put it in the state. Such values can be defined as fields on the component instance.

06.Things about Error Handling Methods
There are mainly two types of error handling methods in ReactJS. These methods are used in the error boundary mechanism.
static getDerivedStateFromError(error)
This method is useful for rendering a fallback UI after an error is thrown.
componentDidCatch(error, info)
This is useful for logging the error information for debugging purposes.

07.Things about Babel
Bable is a javascript compiler it compiles javascript ES2015+ code into older version javascript code for new or old browser and environment compatible. Babel can do fo you —
Transform syntax
Polyfill features that are missing in your target environment.
Source code transformations.

08.Things about Optimizing Performance
Internally, React uses several clever techniques to minimize the number of costly DOM operations required to update the UI. For many applications, using React will lead to a fast user interface without doing much work to specifically optimize for performance. Nevertheless, there are several ways you can speed up your React application.
09.Things about, Why Not Use try / catch?
try / catch is great but it only works for imperative code:
try {
} catch (error) {
// …
However, React components are declarative and specify what should be rendered:
<Button />
Error boundaries preserve the declarative nature of React and behave as you would expect. For example, even if an error occurs in a componentDidUpdate method caused by a setState somewhere deep in the tree, it will still correctly propagate to the closest error boundary.

10.Things about Browserify
Browserify is a mechanism for selecting js modules for the browser. Browserify to arrange code and handle third-party libraries. Frequently, publishing modules to npm which are designed to work in both node and in the browser using Browserify and many packages on npm are proposed for use in just the browser. npm is for all javascript.