Giter VIP home page Giter VIP logo

Comments (8)

Gong-Elory avatar Gong-Elory commented on June 8, 2024 3

写得很棒,但是

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.

peterlxb avatar peterlxb commented on June 8, 2024 1

虽然我英文不好,但是library 是库的意思吧

A JavaScript library for building user interfaces

用来构建用户界面的库。。。应该这样翻译吧

from blog.

fi3ework avatar fi3ework commented on June 8, 2024 1

好吧,查了一下,你说的没错,准确的说确实是库,感谢指正
参考:我们所说的前端框架与库的区别?

from blog.

peterlxb avatar peterlxb commented on June 8, 2024

很棒。
但是React应该只是库library,不是framework

from blog.

fi3ework avatar fi3ework commented on June 8, 2024

@peterlxb react 是框架哦,是视图框架,框架与库的区别在与框架有限制,你只能按框架要求的写法写,只给了你几个生命周期去用,react 就是如此。而像 jq 或者 lodash 就是库,可以说就是提供一些方便的函数而已,不会要求你怎么用。

from blog.

ZWkang avatar ZWkang commented on June 8, 2024

后面可以加一些跟V3版本设计改动的地方。
还有router的一些简单应用render props之类的设计
nice article

from blog.

MrRENGE avatar MrRENGE commented on June 8, 2024

翻react-router的源码发现入手开始看有些难度,硬着头皮看了history中的一些封装,感觉方向不对,果断搜索了一下react-router源码解读,看完大概了解到封装的思路。谢谢博主

from blog.

iwits avatar iwits commented on June 8, 2024

写得太好了 感谢

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.