Tag JavaScript

React documentation read through -part one

1. read-only nature of prosp 1.1 pure functions personal understanding: pure functions are functions that do not change the input parameters inside the function, and the same input will always get the same output, and there are no side effects…

A METHOD OF REFERENCING CSS IN JSX

step 1: create a new css file in the page or pages directory, such as style.css; step 2: import the css file in the jsx page, for example: Step 3: Add the className attribute to the complex you need to…

React Hook

Hooks are functions that allow you to “hook” into React features in function components (hooks are a new feature in react16.8 that allows function components to use state and other react features) No.1 useState useState is used to create state…