Component part of react foundation -- design composite component

Design composite components Preface Why do you ask me to blog? Because Alaska loves to write bugs!!! WeChat public number: love to write bugger's Alaska If there are any questions or suggestions, please go to the public address to share with us how to write bugger! Book continued above -- component part II of rea ...

Posted by steelerman99 on Fri, 31 Jan 2020 01:08:18 -0800

Based on react, react hooks, redux, ts handwritten ant design pro, with supporting api of node, eggjs, ts, mysql, redis

introduce At the beginning, I needed an amdin template developed by react. After finding one side in the open source community, I compared the UI of Ant Design Pro. When I pulled down the code of Ant Design Pro for research, I found that there were too many contents. Besides react and redux, there wer ...

Posted by Spikey on Wed, 29 Jan 2020 02:22:14 -0800

Development Notes: useRef gets the previous status and useEffect

16. The pit in useeffect and the status before using useRef to record 1. Scene description Usage when using useEffect hooks, we will add a dependency to it to complete some side effects when one or some dependencies change. The normal usage is as follows: import React, { useEffect, useState } from " ...

Posted by munchy on Mon, 20 Jan 2020 01:44:29 -0800

React actual battle - star rating and merchant list component

1, Star evaluation component import '../../Assets/css/star.css'; import React from 'react'; class StarScore extends React.Component { renderScore(){ let wm_poi_score = this.props.score || ''; let score = wm_poi_score.toString(); let scoreArray = score.split('.'); // ...

Posted by fontener on Sat, 18 Jan 2020 06:04:22 -0800

Create react app quickly builds react projects, antd loads incoming and local request data on demand

# Global installation npm install -g create-react-app # Build a my-app Item npx create-react-app my-app cd my-app # Tap on the key points of the blackboard, if you want to use less,Or it depends on the use webpack Configuration files, exposing webpack Profiles, using create-react-app The created projec ...

Posted by Misticx on Thu, 16 Jan 2020 02:51:06 -0800

Daily practice

Search insert location (simple) Given a sort array and a target value, find the target value in the array and return its index. If the target value does not exist in the array, returns where it will be inserted sequentially. You can assume that there are no duplicate elements in the array. Probl ...

Posted by jmelnick on Mon, 13 Jan 2020 03:59:29 -0800

React ----- learning notes ----- using JSX to describe UI information (3)

Modify the contents of src/index.js: import React, {Component} from 'react' import ReactDOM from 'react-dom' import './index.css' class Header extends Component{ render () { return ( <div> <h1>my-react</h1> </div> ) } } ReactDOM.render( ...

Posted by amycrystal123 on Wed, 08 Jan 2020 08:20:07 -0800

react short book project

Header For fear of style conflicts among components, install the following for management npm install styled-components First, change index.css to style.js. If you want to set global variables, such as reset, then import {injectGlobal} from 'styled-components'; injectGlobal` html, body, div, span, applet, object, ...

Posted by comicrage on Sat, 04 Jan 2020 02:42:24 -0800

IndexRoute is discarded in react routerv4 version

background Recently, I wrote a simple Hello World program to invert react family bucket. When using the IndexRoute of react router, the browser reported an error Demand style The default Home page is Home, which you want to achieve through IndexRoute Project dependent version "dependencies": { "react": "^16.5.0" ...

Posted by theref on Fri, 03 Jan 2020 11:15:08 -0800

Solution to cross domain problem of react+spring records

react cross domain access background, default is cross domain problems, and fire arc and Google browser, cross domain problem display is not the same Google browser is as follows: The status here is 200, but there is no information in Response, as shown below   However, the description of this problem in fire arc browser is much clearer, Fir ...

Posted by d-m on Thu, 02 Jan 2020 14:46:36 -0800