some important things to know as a react developer.

  • It ensures faster rendering.
  • It guarantees stable code.
  • It is SEO friendly.
  • It comes with a helpful developer toolset.
  • There is React Native for mobile app development.
  • It facilitates the overall process of writing components.
class CustomButton extends React.Component {
// ...
}

CustomButton.defaultProps = {
color: 'blue'
};
render() {
return <CustomButton /> ; // props.color will be set to blue
}
render() {
return <CustomButton color={null} /> ; // props.color will remain null
}
  1. Prevent rendering with null
  2. React element variables
  3. The ternary operator in React
  4. Short-circuit AND operator (&&)
  5. Immediately invoked function expressions (IIFEs)
  6. React subcomponents
  7. Enum objects
  8. Higher-order components (HOCs) in React
  1. Its library is very large and takes time to understand
  2. It can be little difficult for the novice programmers to understand
  3. Coding gets complex as it uses inline templating and JSX
  • Class components extend from React.Component.
  • In here you have to use this keyword to access the props and functions that you declare inside the class components.
  • Functional Components mainly focuses on the UI of the application, not on the behavior.
  • To be more precise these are basically render function in the class component.
  • Functional Components can have state and mimic lifecycle events using Reach Hooks

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store