react from scratch

1, react component brief introduction Component classification: Basic components: basic tags such as input and button, as well as general UI components encapsulated by antd Business component: business abstraction UI composed of basic components. For example, the drop-down box of company department information Block component: a UI block c ...

Posted by hessodreamy on Sat, 06 Nov 2021 17:27:53 -0700

Brief summary of the first day of react

react is a framework for building user pages, which consists of four major parts: react: core library,React dom: dom operation (using jsx to operate dom elements)React Router: route (similar to vueRouter)redux: centralized state management (similar to vuex) react features: 1) Declarative creates user pages in a form similar to writing html ta ...

Posted by skissiks on Sat, 06 Nov 2021 13:59:47 -0700

React passes parameters through url and routes

Based on my previous article "Write a simple navigation with react route", which expanded above, friends can go to Kangkang. ย  The methods passed by url are: 1) Direct? Receive: this.props.location.search 2) query receive: this.props.location.query 3) State Receive: this.props.location.state 4) Params reception: this.props.l ...

Posted by FrostedFlakes on Wed, 03 Nov 2021 09:13:44 -0700

Hooks + TS build a task management system -- implementation of drag and drop function

๐Ÿ“ข Hello, I'm Xiaocheng, a sophomore front-end enthusiast ๐Ÿ“ข This series of articles is a learning summary of the practical jira task management system ๐Ÿ“ข Thank you very much for reading. You are welcome to correct the wrong places ๐Ÿ™ ๐Ÿ“ข May you be loyal to yourself and love life In the last article, we wrote the task group pa ...

Posted by lamajlooc on Tue, 02 Nov 2021 17:08:40 -0700

Five common scenarios and examples of JavaScript deconstruction assignment

Deconstruction assignment syntax is a JavaScript expression. By deconstruction assignment, you can take the attribute / value from the object / array and assign it to other variables. This syntax is a new syntax introduced by ECMAscript 6 specification, which makes it easier to get values from arrays and objects. 1. Extract data Let's tak ...

Posted by amelhedi on Mon, 01 Nov 2021 08:02:24 -0700

Basic part of React

The basic part of react also needs us to grasp it in depth. Like other bloggers, I suggest using the JS package that is convenient for beginners to reference first. I'm also a beginner. That's what I did before. websotrm and vscode tools are OK. The three packages are react.js (Core Library), react-dom.js (providing DOM related services) and br ...

Posted by jbingman on Fri, 29 Oct 2021 02:16:56 -0700

Some thoughts and best practices on react-derived States

Derived state of React Prior to react 16.3, the only way to update the state s inside a component when props changed was to use componentWillReceiveProps followed by a getDerivedStateFromProps. There are two scenarios when using a derived state: Manage a copy of the props passed by the parent component in the state of the child componen ...

Posted by macinslaw on Sun, 24 Oct 2021 09:27:00 -0700

React learning notes -- route dom of component communication

ย  Recently, in the study of react, vue is used in our work. In the process of learning, we compare the two to deepen our understanding. ย  The following is a small part of the knowledge points in react, which I personally think is also a common knowledge point. One of the ways of react component communication - routing parameters ...

Posted by punked on Sat, 23 Oct 2021 22:03:53 -0700

Redux from entry to advanced level, just read this one!

๐ŸŒ‚ preface As we all know, react is a one-way data flow, so it is relatively simple to transfer data, and the relationship between father and son is relatively clear. However, if we want to transfer more complex data, using react alone is not enough. Therefore, we need to use redux for more complex data transmission. In the following arti ...

Posted by mpf on Thu, 21 Oct 2021 18:46:36 -0700

Did you really use React's setState correctly?

ย  ย  First of all, we need to make it clear that setState is not an asynchronous method, which is very similar to the reason for asynchrony: there is a deviation between the call order of hook () and synthetic events and the execution order of setState, resulting in an asynchronous presentation form, resulting in the illusion of asynchro ...

Posted by CreativeWebDsign on Wed, 20 Oct 2021 18:28:24 -0700