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

希望Taro支持spread表达式 #606

Closed
vonweb opened this issue Sep 11, 2018 · 4 comments
Closed

希望Taro支持spread表达式 #606

vonweb opened this issue Sep 11, 2018 · 4 comments

Comments

@vonweb
Copy link

vonweb commented Sep 11, 2018

在组件内使用spread表达式,报编译失败,提示
Error: JSX 参数暂不支持 ...spread 表达式

@vonweb vonweb changed the title 希望Taro 希望Taro支持spread表达式 Sep 11, 2018
@luckyadam
Copy link
Member

贴一下你的代码

@yuche
Copy link
Contributor

yuche commented Sep 11, 2018

微信要求每一个 props 都具体指明,除非未来开放更多能力,否则看不到支持的可能性。

@yuche yuche added the wontfix label Sep 11, 2018
@vonweb
Copy link
Author

vonweb commented Sep 11, 2018

@yuche 大神知道react是如何实现的吗,如果知道麻烦您告知react实现这块功能的源码或原理

@yuche
Copy link
Contributor

yuche commented Sep 11, 2018

React 的 JSX 是编译成 React.createElement 的形式,createElement 的第二个参数就是 props,有什么 props 就传什么就好了

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

No branches or pull requests

3 participants