GithubHelp home page GithubHelp logo

Comments (6)

watsonnnnn avatar watsonnnnn commented on April 28, 2024 2

组件分的这么细,之间的通信怎么解决呢?

from weekly.

chaosJS avatar chaosJS commented on April 28, 2024

请问,https://github.com/dt-fe/weekly/blob/master/34.%E7%B2%BE%E8%AF%BB%E3%80%8AReact%20%E4%BB%A3%E7%A0%81%E6%95%B4%E6%B4%81%E4%B9%8B%E9%81%93%E3%80%8B.md
这一期最后部分有一行代码:
onChange(value => console.log(value!.name))
这个value!.name是什么写法啊,有相关的语法介绍或文档吗?或者是笔误?
@ascoders

from weekly.

ascoders avatar ascoders commented on April 28, 2024

是 ts 的语法,另外也有一套 stage1 提案:proposal-optional-chaining

目前来看语法不太一样,分别是 !.?.

from weekly.

ascoders avatar ascoders commented on April 28, 2024

@nicewahson 通过很多数据流框架的依赖注入可以解决。

from weekly.

liutian avatar liutian commented on April 28, 2024

看场景,我觉得大部分场景分这么细都是给自己找罪受或者给接盘的人找罪受,当然如果你恰好遇到那一小部分特殊场景,组件细分肯定是有好处的

from weekly.

dancerphil avatar dancerphil commented on April 28, 2024

看场景,我觉得大部分场景分这么细都是给自己找罪受或者给接盘的人找罪受,当然如果你恰好遇到那一小部分特殊场景,组件细分肯定是有好处的

@liutian 这篇文章是 2017 年的,不要用现在的视角看。站在现在的视角,我同意你说的,除非遇到场景,否则没必要。

from weekly.

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.