10 hours
- Medium
Free online content available in this course.
course.header.alt.is_video
course.header.alt.is_certifying
Got it!Last updated on 3/31/22
Working With Components
Evaluated skills
- Explain JavaScript frameworks and libraries are
- Use "create-react-app" to generate, develop, and build your React project
- Turn specifications into a well-architected React application
Question 1
If a component is written as a Javascript function, and then rewritten as a Javascript class, the return value of its `render` function should be:
Careful, there are several correct answers.the elements that the component should render.
nothing – render functions render via JSX and don't need a return value.
exactly the same as the return value of the component when it was written as a function.
Question 2
Component `props` are:
Careful, there are several correct answers.read-only.
passed in when the component is called.
available to all of a component's child component descendants.
one of many ways that components can pass information to their children.
Question 3
The right place for code meant to run during a component's initialization is:
When a component's output is first inserted into the DOM it will trigger a hook called `componentDidMount`, and when it's removed from the DOM it will trigger one called `componentWillUnmount
in the return value of the `render` function.
in the constructor function.
in a function called 'componentDidMount'.
in a function called 'componentWillUnmount'.