What is the purpose of render() in React.
Each React component must have a render()
method. It returns a single React element-- the representation of the native DOM element. If more than one HTML element needs to be rendered, then they must be grouped together inside one enclosing tag such as: form, group, div, etc. This function must be kept pure i.e., it must return the same result each time it is invoked.