Explain the purpose of render() in React?

Question
  • Each React component must have a render() mandatorily.
  • It returns a single React element which is the representation of the native DOM component.
  • If more than one HTML element needs to be rendered, then they must be grouped together inside one enclosing tag.
  • This function must be kept pure i.e., it must return the same result each time it is invoked.
3 years 2021-08-06T03:49:17+00:00 3 views 0

Leave an answer

Browse
Browse