React-router is the community favourite routing solution - it can handle all of your complex routing needs and in this lesson we’ll cover what’s neede
转载 2017-06-20 15:14:00
165阅读
2评论
Not every app is greenfield, and it would be a shame if existing React apps could not benefit from the micro-size of Preact. In this lesson we’ll disc
转载 2017-06-18 00:07:00
68阅读
2评论
Redux is one of the most popular state-management libraries and although not specific to React, it is widely used with it. This is why the author of P
转载 2017-06-21 23:48:00
111阅读
2评论
写在前面生命在于折腾,Coder的折腾就在于造各种轮子。React在前端圈大火之后,轮子层出不穷。而其中的一些轮子,由于专注于解决很多人诟病的React过大、过慢的问题(然而不并不觉得),也相当出名。关注最多的莫过于Preact、Inferno等以「轻量化」为特色的库了,Github Star数也超过10000。另外由于React广泛应用于同构应用上,并且 rendertoString,rende
原创 2021-01-09 22:05:22
3483阅读
By creating a simple ‘hello world’ example application first in vanilla Javascript, and then in Preact without any tools, we’ll learn what type of pro
转载 2017-06-16 04:04:00
131阅读
2评论
Some applications only need a very minimal routing solution. This lesson will cover a practical example showing the router in use. We’ll build a simpl
转载 2017-06-18 02:34:00
72阅读
2评论
React 的代码库现在已经比较庞大了,加上 v16 的 Fiber 重构,初学者很容易陷入细节的汪洋大海,搞懂了会让人觉得自己很牛逼,搞不懂很容易让人失去信心, 怀疑自己是否应该继续搞前端。那么尝试在本文这里找回一点自信吧(高手绕路).PreactReact 的缩略版, 体积非常小, 但五脏俱全. 如果你想了解 React 的基本原理, 可以去学习学习 Preact 的源码, 这也正是本文
转载 2022-01-11 16:54:43
185阅读
React的代码库现在已经比较庞大了,加上v16的Fiber重构,初学者很容易陷入细节的大海,搞懂了会让人觉得自己很牛逼,搞不懂很容易让人失去信心,怀疑自己是否应该继续搞前端。那么尝试在本文这里找回一点自信吧(高手绕路).PreactReact的缩略版,体积非常小,但五脏俱全.如果你想了解React的基本原理,可以去学习学习Preact的源码,这也正是本文的目的。关于React原理的优秀的文
原创 精选 2019-09-22 15:04:28
1486阅读
1点赞
React源码看过几次,每次都没有坚持下来,索性学习一下PReact部分,网上讲解源码的不少,但是基本已经过时,所以自己来梳理下render.js部分import { EMPTY_OBJ, EMPTY_ARR } from './constants'; import { commitRoot, diff } from './diff/index'; import { createElement, 
转载 2021-04-03 07:41:11
86阅读
2评论
Preact offers, in addition to the regular component API from React, the ability to access both props & state as function parameters to the render meth
转载 2017-06-17 22:01:00
114阅读
2评论
Storing and updating values inside a component’s local state (known as controlled components) is such a common pattern that Preact offers a really han
转载 2017-06-17 22:25:00
154阅读
2评论
/* react获取服务器APi接口的数据: react中没有提供专门的请求数据的模块。但是可以使用任何第三方请求数据模块实现请求数据 1、axios https://github.com/axios/axios axios的作者觉得jsonp不太友好,推荐用CORS方式更为干净(后端运行跨域) 1
转载 2021-08-13 08:44:52
1126阅读
React 网络请求 使用axios完成网络请求 import React from 'react'; import axios from 'axios'; import PubSub from 'pubsub-js' import ReconnectingWebSocket from "recon ...
转载 2021-10-07 21:25:00
119阅读
2评论
react——网络请求
原创 2022-09-27 13:45:39
64阅读
hook源码其实不多,但是实现的比较精巧;在diff/index.js中会有一些optison.diff这种钩子函数,hook中就用到了这些钩子函数。 在比如options._diff中将currentComponent设置为nulloptions._diff = vnode => {     currentComponent = null;if (oldBeforeDiff) oldBe
转载 2021-04-07 13:40:54
84阅读
2评论
如下面的Code,分别介绍了GET,POST,以及使用XMLHttpRequest的Get请求。
转载 2016-10-12 19:26:00
88阅读
2评论
如何在React中做Ajax 请求?首先:React本身没有独有的获取数据的方式。实际上,就React而言,它甚至不知道有服务器画面的存在。React只是简单地渲染组件,单独从两个地方获取数据:props 和 state。因此,为了使用服务器的数据,你需要在你的组件(component)的props或state里拿到数据。你可以将这个过程与服务和数据模型复杂化,就像你所希望的那样,但最终只是组件渲
转载 2023-12-25 10:54:01
70阅读
顾名思义,本章主要是前端小白就【如何快速编写一个前端react项目】做的总结。前端大牛可移步~背景  组内有一个测试工具平台,直接用python的Django写的前端+后端。由于界面简陋+不专业+没有前后端分离,所以就想着对该平台做个前端重构。框架选择的是公司大前端同款react框架。秉着快速重构完成为主,学习为辅的想法。环境构建手动构建步骤:安装node,npm创建项目文件夹test_tools
转载 2024-01-17 11:20:29
54阅读
网络工具库
原创 2022-03-10 09:42:33
221阅读
import React from 'react';import { Text, View, StyleSheet, Picker, Image} from 'react-native';export default class App extends React.Component{
原创 2022-06-06 18:13:20
193阅读
  • 1
  • 2
  • 3
  • 4
  • 5