Skip to main content
InterviewHubPRO
Section Overview
Q336

Question 336 of 407

Part 9: React Hooks Deep Dive (262 - 316)

83%
React Core & Hooks (407 Qs)•Part 9: React Hooks Deep Dive (262 - 316)

What is the purpose of render method of react-dom?

junior LevelCode ExampleHooks

This method is used to render a React element into the DOM in the supplied container and return a reference to the component. If the React element was previously rendered into container, it will perform an update on it and only mutate the DOM as necessary to reflect the latest changes.

css
    ReactDOM.render(element, container, [callback])
python
If the optional callback is provided, it will be executed after the component is rendered or updated.