Sobre a Aula
Learning Test
To ensure that you assimilate this knowledge, here are some questions about the course content that will help you capture what you have learned.
Get to work. And have fun!
Questions
1. What is React.js?
- A) A programming language
- B) A JavaScript library for building dynamic user interfaces
- C) A framework for web development
- D) A relational database
2. What is the main advantage of componentization in React.js?
- A) Facilitates the installation and configuration of the development environment
- B) Improves the code execution performance
- C) Allows dividing the user interface into reusable parts
- D) Reduces the need to write CSS code
3. What is the function of Virtual DOM in React.js?
- A) Update all parts of the page at once
- B) Make the application slower
- C) Update only the parts of the page that have been modified
- D) Manage the internal state of components
4. What is required to install Create React App?
- A) Node.js
- B) MongoDB
- C) Python
- D) Ruby
5. Which command is used to create a new React project with Create React App?
- A)
npm install -g create-react-app
- B)
npx create-react-app project-name
- C)
npm start
- D)
yarn create react-app project-name
6. What is the advantage of creating reusable components in React.js?
- A) Makes the code more confusing
- B) Makes collaboration between development teams more difficult
- C) Improves code organization and maintainability
- D) Increases development efficiency
7. How is a functional component defined in React?
- A) By extending the class
React.Component
- B) By using the function
function Component() {}
- C) By creating an instance of the class
Component
- D) By importing the library
react-component
8. What is the function of Hooks in React?
- A) Manage the internal state of components
- B) Handle user events
- C) Integrate React with external libraries
- D) Use React features without writing classes
9. What are Props in React?
- A) Internal data of a component
- B) Callback functions
- C) Attributes that we pass to components
- D) Lifecycle methods
10. In which lifecycle phase of components is the method componentDidUpdate()
called?
- A) Mounting
- B) Updating
- C) Unmounting
- D) Rendering
11. How is conditional rendering done in React?
- A) Through the method
renderCondition()
- B) By using the function
renderIf()
- C) Using conditional structures like
if
andelse
- D) With the function
renderConditional()
12. What is the main advantage of event handling in React?
- A) Reduce component performance
- B) Improve code organization
- C) Increase component complexity
- D) Create interactivity in components
13. How is communication between components done in React?
- A) Through the property
component
- B) By using the function
sendData()
- C) Through Props and Events
- D) With the function
communicate()
14. What is the main purpose of component documentation in React?
- A) Facilitate understanding and future use of components
- B) Optimize component performance
- C) Reduce code reuse
- D) Minimize collaboration among team members
15. What technique is used to optimize the performance of components in React?
- A) Synchronous rendering
- B) Excessive memory usage
- C) Lazy loading
- D) Direct DOM manipulation
16. How are component tests written in React?
- A) By using the function
testComponent()
- B) Through specific test classes
- C) With the Jest testing library
- D) Through manual testing
17. What is the main advantage of global state management in React?
- A) Increase excessive prop spreading
- B) Reduce application efficiency
- C) Centralize shared data between multiple components
- D) Limit code reuse
18. How are files organized in a React project?
- A) Randomly, without specific patterns
- B) Grouping files by type (e.g., all components in one folder)
- C) Separating files into folders with random names
- D) Placing all files in the project’s root folder
19. What is the purpose of Redux in a React application?
- A) Manage the application’s business logic
- B) Completely replace React
- C) Manage the application’s global state
- D) Perform server-side rendering
20. What are Middlewares in Redux?
- A) Functions that perform specific actions in response to events
- B) React components responsible for rendering logic
- C) Plugins that change the behavior of Redux functions
- D) Routes defined for navigation in a React application
Test answer sheet
I believe you learned all the content and the result was exceptional. However, you can check your answers in the template below:
Answers
- What is React.js?
- Correct answer: B) A JavaScript library for building dynamic user interfaces
- What is the main advantage of componentization in React.js?
- Correct answer: C) Allows dividing the user interface into reusable parts
- What is the function of the Virtual DOM in React.js?
- Correct answer: C) Update only the parts of the page that have been modified
- What is needed to install Create React App?
- Correct answer: A) Node.js
- Which command is used to create a new React project with Create React App?
- Correct answer: B)
npx create-react-app project-name
- Correct answer: B)
- What is the advantage of creating reusable components in React.js?
- Correct answer: C) Improve code organization and maintainability
- How is a functional component defined in React?
- Correct answer: B) Using the function
function Component() {}
- Correct answer: B) Using the function
- What is the function of Hooks in React?
- Correct answer: D) Use React features without writing classes
- What are Props in React?
- Correct answer: C) Attributes that we pass to components
- In which lifecycle phase of components is the
componentDidUpdate()
method called?- Correct answer: B) Update
- How is conditional rendering done in React?
- Correct answer: C) Using conditional structures like
if
andelse
- Correct answer: C) Using conditional structures like
- What is the main advantage of event handling in React?
- Correct answer: D) Create interactivity in components
- How is communication between components done in React?
- Correct answer: C) Through Props and Events
- What is the main purpose of component documentation in React?
- Correct answer: A) Facilitate understanding and future use of components
- What technique is used to optimize the performance of components in React?
- Correct answer: C) Lazy loading
- How are component tests written in React?
- Correct answer: C) With the Jest testing library
- What is the main advantage of global state management in React?
- Correct answer: C) Centralize shared data between multiple components
- How are files organized in a React project?
- Correct answer: B) Grouping files by type (e.g., all components in one folder)
- What is the purpose of Redux in a React application?
- Correct answer: C) Manage the global state of the application
- What are Middlewares in Redux?
- Correct answer: C) Plugins that alter the behavior of Redux functions
Entrar na conversa