Front end permission design
1, Foreword
For front-end projects, especially the middle and back office management system projects, permission design is one of the most complex points.
Generally speaking, permission design needs to be checked by the back end. After all, the front end is relatively unable to ensure security, and the code and data requests of the front end ...
Posted by bals28mjk on Thu, 24 Feb 2022 12:12:37 +0100
Virtual Dom and diff algorithm
1. What exactly is JSX
When you use react, you will write JSX. What is JSX? It is an extension of Javascript syntax. React uses it to describe what the user interface looks like. Although it looks very much like HTML, it is Javascript. Babel will compile JSX into the React API before the react code is executed
<div className="container"> ...
Posted by uluru75 on Tue, 22 Feb 2022 10:24:46 +0100
Redux status management
redux Chinese document https://www.redux.org.cn/
redux official website https://redux.js.org/
The so-called state management is to manage the data in the application.
Concept: almost all projects with chaotic data flow management can't go online. A good project must have very good data flow management.
How to use Redux? Remember "thre ...
Posted by psycovic23 on Mon, 21 Feb 2022 15:17:03 +0100
Three attributes of components: state, props and refs
1, Three attributes of component instance
(1)state
View status: there is a property on the written component instance, state, which represents the status of the component.
Next, we write a stateful component:
<body>
<div id="test"></div>
<script type="text/babel">
// Create component
class ...
Posted by misxa on Mon, 21 Feb 2022 14:27:37 +0100
The difference between vue3 and vue2 (you don't know the details are all here)
Let's talk about the current market development and use. At present, there are still few enterprises using vue3 in 2021, and they are basically developed in the form of vue2. The development mode of vue3 is very similar to react. At this time, someone will think whether it is useful for me to learn vue3. Gan, he mews. Don't get excited and list ...
Posted by duhhh33 on Mon, 21 Feb 2022 12:49:20 +0100
React Context quick use
1 use background
In order to transfer data across components, especially across multi-level components, using context can simplify the process and make it clearer. It should be noted that components that depend on context will be updated when the context changes (not controlled by shouldComponentUpdate) It should be noted that the context ...
Posted by Loathor__Healer on Sun, 20 Feb 2022 13:19:49 +0100
JavaScript Object. Use of defineproperty() method
Object. Use of defineproperty() method
Object. The defineproperty () method will directly define a new property on an object, or modify an existing property of an object and return the object.
Object.defineProperty(obj, prop, descriptor)
Parameters:
obj: object to define attributeprop: the name or Symbol of the attribute to be defined or ...
Posted by toodi4 on Sun, 20 Feb 2022 10:25:17 +0100
React centralized route management + route authentication
1. Why use react_router_config
Using routes in React generally uses NavLink and Route in React router DOM, writes Route links using NavLink, and registers routes using Route:
import { NavLink, Route } from 'react-router-dom';
...
{/* Routing link */}
<NavLink to="/home">Home</NavLink>
<NavLink to="/about">About</NavLink& ...
Posted by lentin64 on Sat, 19 Feb 2022 22:05:59 +0100
Virtual DOM and Diff algorithm of react from introduction to practice
1, Virtual DOM and Diff algorithm of react
Virtual DOM and diff algorithm are two core concepts in React. We need to have a comprehensive understanding of them. This is very helpful for us to use scaffolding to develop projects, especially for projects in which the front and back ends of the enterprise are separated (similar to: background ma ...
Posted by oneofayykind on Fri, 18 Feb 2022 04:15:31 +0100
Share your recent experience of learning react source code
Share your recent experience of learning react source code
Write in front: I have been learning the source code of React recently. The purpose of writing this article is two:
Share your learning experience and hope that students with relevant learning needs will have an address to find and avoid detours.Convert the learned content into text ...
Posted by ninevolt1 on Thu, 17 Feb 2022 21:21:42 +0100