React
You should create a functional component named App
as the main entry point of your React application. Your React code should be linted using ESLint with the recommended configuration for React.
Version
Running on Node.js v20.0.0
Supported languages
Javascript
Testing framework
Special reminders and implementation details
- React Testing Library, a library to assist with testing React components. It is built on top of DOM Testing Library by adding APIs for working with React components.
Example with React Testing Library:
js
import {cleanup, render, screen } from '@testing-library/react';
import App from './App.jsx';
afterEach(cleanup);
describe('App', () => {
test('Should display "Hello World!"', () => {
render(<App />);
expect(screen.getByText("Hello World!")).toBeInTheDocument();
});
});
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Remember to always keep your components modular and make use of React's hooks and context API for state management and side effects.