Replies: 3 comments 4 replies
-
Hello @cqh963852 |
Beta Was this translation helpful? Give feedback.
-
I have made a PR #166 that should solve the children and attributes type issues @Tao-VanJS |
Beta Was this translation helpful? Give feedback.
-
It is type related, but not only type change. The createElement function will be refactored.
Under this structure, side effects can be better recycled within the component. You can view the details of this implementation
The reason for restricting children to the above type is that it is easier to achieve this goal with this type. |
Beta Was this translation helpful? Give feedback.
-
As of now, van_jsx cannot handle children of array type as well.
Limit the children type.
Accept
type Children = JSXNode | JSXNode[] | ()=>(JSXNode | JSXNode[])
The above type of processing will be simpler than the implementation of the previous version. And adding caching to jsx can realize the ability of array diff
I created another implementation to prove that this idea is feasible. Maybe it can be used to enhance van_jsx
@Tao-VanJS @yahia-berashish
Beta Was this translation helpful? Give feedback.
All reactions