-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Refactor Popup / ActionSheet / Modal #1125
Comments
应该是添加而不是修改。 |
#1121 里的问题抽象来看就是,
|
@paranoidjk 不要修改,要把 component 抽出来,类似 RN modal actionsheet toast 那样,index 提供 api,另外提供一个纯 component 的 |
@yesmeck 之前说的重复 render 是可行的。 https://facebook.github.io/react/docs/react-dom.html#render
|
问题
#1121
#635
Popup / ActionSheet / Modal 渲染完成后无法通过修改 props 触发 rerender 的问题。
原因
Popup / ActionSheet / Modal 这三个组件的 API 都是
Popup.show(content)
的形式,content 被 render 在单独创建的 div 里,导致渲染完成后,外部无法修改 content 的 props 触发 rerender。解决方案:
Api 改成如下形式
The text was updated successfully, but these errors were encountered: