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评论
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评论
Web Starter Kit与Preact Signals集成:响应式状态管理 你是否在开发多设备网站时遇到状态管理复杂、UI更新不同步的问题?本文将带你通过Web Starter Kit与Preact Signals的集成,实现高效的响应式状态管理,让你的Web应用在各种设备上都能流畅运行。读完本文,你将了解如何在app/scripts/main.js中集成Preact Signals,掌握
转载 12天前
340阅读
// Window large lists with react-virtual // http://localhost:3000/isolated/final/04.js import React from 'react' import {useVirtual} from 'react-virtu
转载 2020-10-23 00:10:00
438阅读
2评论
以上就是我们对React的初步认识,包括React的概念、基础知识、如何创建React项目、编写React应用程序,以及一些基本的操作。接下来,
原创 精选 2023-09-26 14:59:51
583阅读
In this lesson, you will learn how to use PureComponent in React to reduce the number of times your component re-renders. This works because PureCompo
转载 2018-09-29 03:25:00
346阅读
2评论
React.PureComponent is similar to React.Component. The difference between them is that React.Component doesn’t implement shouldComponentUpdate(), but 
转载 2018-02-05 03:04:00
286阅读
2评论
thetransferPropsTomethod lets you easily push properties into your components to easily customize attributes.From last two exmaples, we have BButton a...
转载 2015-03-24 17:23:00
193阅读
2评论
react-router
原创 2021-09-01 09:37:25
480阅读
Mixins will allow you to apply behaviors to multiple React components.Components are the best way to reuse code in React, but sometimes very different...
转载 2015-03-25 17:16:00
167阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5