INFO3330 final exam
React is ....
All of these answers
Which of the following is NOT a JavaScript framework?
CoffeeScript
In Angular above each class declaration, we added the following syntax: @Component() Which of the following is the best name for the syntax we added?
Decorator
Babel converts JavaScript INTO pure JSX, so it will run in the browser.
False
React Router comes with React, so we did not have to install any libraries to use it.
False
You have to use React for your entire user interface or none at all. It CANNOT be mixed with other UI frameworks.
False
Components are the fundamental building blocks of Angular. Which of the following is NOT a function of Angular components?
Handle URL routing
The most common way to display data in views in Angular is by using {{ }} (curly braces). What is this method called for injecting data in the views?
Interpolation
JSX Stands for which of the following?
JavaScript as XML
The virtual DOM is ...
JavaScript object
Which of the following is NOT a version of the React Router?
React Router Internet
How does React handle changes in state?
React calls the render function and re-renders the change in state
Inside of a Switch element, what is the tag name used to define the possible routes?
Route
React is primarily concerned with what portion of the MVC framework?
The View
When we created a new component in Angular using the Angular CLI, four files were created for us by default. Which of the following was NOT one of the files created?
The service file
In Angular, when using a directive in an element like a repeater directive or a conditional directive, all the children of the host element will be considered to be in the block of the directive.
True
In React Router, the Navlink element is used to define links.
True
In React, you can create components by creating a class that derives from React.Component or simply create a function that receives props and returns what a render method would return.
True
In a React application, you can declare multiple React.Component classes in the same JS file.
True
It is a good idea to remove data access from specific components of the UI and put the functionality in a service, which can then be changed and injected into different components when needed.
True
React components are composable which means we can build UI components out of existing components (a.k.a. tags).
True
React is so fast because it never reads from the real DOM. It just writes to the real DOM if changes have occurred.
True
The following two lines of Angular code are two different ways to bind a property named CoolTitle from a TypeScript class to the template view: <h2 [textContent]="CoolTitle"></h2> <h2 textContent="{{CoolTitle}}"></h2>
True
The render method of the React.Component class must return a component with a single root element.
True
The use of dependency injection is an example of Inversion of Control.
True
Which of the following is NOT native to the Angular framework?
Virtual DOM
In the tic-tac-toe React app, we moved state from the square, to the board, to the game. What did we achieve by moving state to the parent components?
We were able to keep the single state in sync across the components.
In React, what is the preferred way to get the user-entered data from a form control?
You should use a ref that links the control to a JavaScript variable.
What element tells the Angular router where to display a component when it gets routed to a host view?
router-outlet
In Assignment 10, we create React Components in different files and import them into our main class App.js. The module system is managed by which of the following libraries?
webpack