wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

React Intro

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

What is react?

a)

Javascript framework for creating user interfaces

b)

Javascript library for creating user interfaces

c)

A programming language used for web app development.

2.

Which one of the following is a way of creating react app?

a)

npx create-react-app my-app

b)

npm create vite@latest my-app --template react

c)

All of the above

3.

What is a component in React?

a)

A function that only manages data storage in a React application.

b)
  • A tool that converts JavaScript code into HTML and CSS for rendering the UI.

c)
  • A reusable piece of UI that can manage its own content, logic, and styling, and can be combined with other components to build complex applications.

4.

What is JSX in react?

a)

JSX is a syntax extension for JavaScript that allows writing HTML-like code within JavaScript, making it easier to structure React components.

b)

JSX is a JavaScript framework for handling backend logic in React

c)

JSX is a CSS styling method used to apply styles directly within JavaScript in React.

5.

What is the correct way to render a component called Home in React?

a)

<Home />

b)

<Home></Home>

c)

{Home}

6.

Which of the following is the correct way to import a component in React?

a)

import './MyComponent' as MyComponent;

b)

import MyComponent from './MyComponent';

7.

How do you start a React app created with Vite?

a)

Run npm start in the project directory.

b)

Run npm run dev in the project directory.

8.

Which one of the following is not a feature of React

a)

Component based

b)

All are correct

c)

Has JSX syntax