When you want to defer the loading of a component until it's needed, you can use React's ________ feature.
- Suspense
- Lazy
- Async
- Deferred
When you want to defer the loading of a component until it's needed, you can use React's Lazy feature. The Lazy function allows you to load components asynchronously, improving the initial loading time of your application. The other options are not specific to deferring component loading in React.
Loading...
Related Quiz
- How Virtual DOM works?
- You have a component deep inside a layout but need to ensure that a modal opened from this component renders directly under the body tag, ensuring it's not affected by the CSS of parent containers. Which approach would you take in React?
- How to create components in React?
- A component needs to fetch data from an API only once when it's first rendered. Which hook/method can be used to achieve this in a functional component?
- How to re-render the view when the browser is resized?