Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于context(越级传递数据) #28

Open
ckinmind opened this issue Jan 13, 2017 · 1 comment
Open

关于context(越级传递数据) #28

ckinmind opened this issue Jan 13, 2017 · 1 comment

Comments

@ckinmind
Copy link
Owner

ckinmind commented Jan 13, 2017

参考资料1:Navigating Programatically
参考资料2: 官方文档:Context
参考资料3:React 中 context 的使用
参考资料4:React context 丢失问题

注意看一下官网的用法,ES6的写法

@ckinmind
Copy link
Owner Author

在react-redux中Provider组件应用了context ,参考资料:Redux 入门教程(三):React-Redux 的用法

React-Redux 提供Provider组件,可以让容器组件拿到state,它的原理是React组件的context属性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant