Comments (8)
写得很棒,但是
rr4 提供了三种渲染组件的方法:component props,render props 和 children props,渲染的优先级也是依次按照顺序,如果前面的已经渲染后了,将会直接 return。
这个地方有问题哦!!!
https://reactrouter.com/web/api/Route/render-func
原文是这样说的:
Warning: <Route children> takes precedence over both <Route component> and <Route render> so don’t use more than one in the same <Route>.
from blog.
虽然我英文不好,但是library 是库的意思吧
A JavaScript library for building user interfaces
用来构建用户界面的库。。。应该这样翻译吧
from blog.
好吧,查了一下,你说的没错,准确的说确实是库,感谢指正
参考:我们所说的前端框架与库的区别?
from blog.
很棒。
但是React应该只是库library,不是framework
from blog.
@peterlxb react 是框架哦,是视图框架,框架与库的区别在与框架有限制,你只能按框架要求的写法写,只给了你几个生命周期去用,react 就是如此。而像 jq 或者 lodash 就是库,可以说就是提供一些方便的函数而已,不会要求你怎么用。
from blog.
后面可以加一些跟V3版本设计改动的地方。
还有router的一些简单应用render props之类的设计
nice article
from blog.
翻react-router的源码发现入手开始看有些难度,硬着头皮看了history中的一些封装,感觉方向不对,果断搜索了一下react-router源码解读,看完大概了解到封装的思路。谢谢博主
from blog.
写得太好了 感谢
from blog.
Related Issues (20)
- 设计模式之「结构型模式」 HOT 1
- 设计模式之「行为型模式」 HOT 3
- 分析生产环境的 Promise 实现,完整理解 Promise 原理
- 跟着 Event loop 规范理解浏览器中的异步机制 HOT 20
- _deprecated
- 简要分析前端代码从 Babel 编译到打包的流程
- [译] 资源提示 —— 什么是 Preload,Prefetch 和 Preconnect? HOT 4
- [译] Prefetch & preconnect-dns 的优先级 HOT 3
- 从一个极简 Node 服务器的实现中能学到什么?
- 浅谈 HTTP 缓存实践 HOT 3
- LazyMan 有几样写法,你知道么? HOT 4
- 浅析 React v16.3 新生命周期函数 HOT 1
- create-react-app 原理及源码分析 HOT 2
- Webpack 中 path/publicPath/contentBase 的关系 HOT 1
- koa2 源码及流程分析 HOT 1
- Knowledge fragment
- Knowledge fragment
- Knowledge fragment
- 如何优雅地彻底解决 antd 全局样式问题 HOT 9
- 不准备继续翻译了么
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.