-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
When I try to create a text field that change h depend on w
so I define elem.props.w and elem.props.h,
If I use useEffect to update h by w, and the draw function is like
function (self, x, y, w, h)
self.props.w=w
...
endAnd finally I want to call elem:render(x, y, w, elem.props.h)
These code I have some problems:
- Before first render,
props.hisnil, so I have to set a default value. - The update is after this frame, this can cause some problem if I have chain of update.
So I wonder, maybe it can be solved by add prerender function to do something before render?
Metadata
Metadata
Assignees
Labels
No labels