HooX: Hook-based React State Management Tool

Why Make Wheels hook self-contained wheel halo I won't go into react hook much. Hook provides the ability to abstract state, which naturally leads to the idea that global state can be extracted based on hook. Because of its inherent wheeled aura, many hook-based state management tools have emerged in the community, such as those developed by t ...

Posted by anto91 on Thu, 26 Sep 2019 23:06:11 -0700

Decorator: From Principle to Practice

Preface Original Link: Nealyang/personalBlog ES6 doesn't have to be introduced much anymore. Before ES6, decorators probably weren't that important because you just needed to add a wrapper layer, but now, with the advent of grammatical sugar classes, the code gets complicated and difficult when we want to share or extend methods between clas ...

Posted by joquius on Tue, 24 Sep 2019 19:46:59 -0700

Ali Front End launches a new React framework: Mirror

Mirror Is a front-end framework based on React, Redux and react-router, simple, efficient, flexible and reliable. Why? We love React and Redux.However, there are too many in Redux Template file , which requires a lot of duplication of effort, is frustrating; let alone integrate react-router routing in real React applications. A typical React/R ...

Posted by reivax_dj on Sun, 22 Sep 2019 19:11:17 -0700

How to Reuse the Logic of a Component

Preface This paper briefly discusses the history of logical combination and reuse modes of React and Vue mainstream view libraries: from Mixins to HOC, then to Render Props, and finally to the latest Hooks. * Note: JS script files are introduced globally in this article, so you will see: const {createElement: h} = React; object deconstruction l ...

Posted by yazz on Sun, 22 Sep 2019 04:20:30 -0700

Why do event functions in React bind this?

The original is in my github Chinese, welcome to subscribe We usually write React as follows: class HelloMessage extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); //Binding this } handleClick(){ console.log( this ) } render() { const { count } = this.state ...

Posted by Beatnik on Tue, 17 Sep 2019 02:10:38 -0700

How to realize Web page recording?

Summary: Very interesting operation. Original: Realization of web Page Recording Screen Translator: frontdog Fundebug Copyright shall be owned by the original author upon authorization to reproduce. Written in front After reading the comments, I suddenly realized that I didn't explain it in advance. This article can be said to be a research ...

Posted by julien on Sun, 08 Sep 2019 23:23:31 -0700

[Optimizing Thought and Scheme 03 of Front-end Carton] Notices for Upgrading Babel 7

babel document babel document babel's brief introduction, recommendation babel 7 Simple Upgrade Guide When upgrading webpack, we found that we need to upgrade babel. Recently, Babel has a larger update, Babel 7. babel simply translates the new syntax of es2015/2016/2017/2046 in JavaScript into es5, enabling low-end runtime environments such a ...

Posted by johnsworld on Thu, 05 Sep 2019 21:08:42 -0700

A redux in a mountain village

This article mainly talks about how to achieve a "simple" Redux through our own understanding. The purpose is not to copy a redux, but to implement the core functions of Redux manually to help us understand and use redux. In fact, redux does not have many core function codes, and a large number of other codes are designed to cope with ...

Posted by kester on Wed, 04 Sep 2019 16:04:42 -0700

React,Vue Gadget for Managing Asynchronous Load Status

load-state github Common projects often encounter management that requires a loading state, such as form submission, which is typically written like this import React from "react"; import "antd/dist/antd.css"; import { Spin, Button } from "antd"; class Demo extends React.Component { state = { loading: false }; submit = async data => { ...

Posted by DangerousDave86 on Tue, 03 Sep 2019 15:17:59 -0700

Using concent, experience a journey of progressively refactoring react applications

In the traditional redux project, the state we write in the reducer is bound to get through to the store. We need to plan the definitions of state and reducer at the beginning. Is there any way to enjoy the benefits of the separation of ui and logic quickly without starting from the rules and regulations according to the text? This article star ...

Posted by majocmatt on Sun, 01 Sep 2019 22:06:23 -0700