-
-
Notifications
You must be signed in to change notification settings - Fork 244
Description
in #134, we're doing a quick fix by using setTimeout to calculate inkTabBarNode position after parent/root node mounted.
The source reason is that InkTabBarNode needs to do a offset calculation upon componentDidMount based on parent/root node ref. In the original mixin approach, componentDidMount is shared between multiple mixin and can be executed in sequence, but the new composite approach has nested component structure and following React lifecycle sequence:
parent render => children render => children mounted => parent mounted...
So strictly speaking, we have to delay children render in every possible parent of inkTabBarNode. As a quick fix, we did a awkward setTimeout in inkTabBarNode's componentDidMount method to achieve the same purpose.
In fact, the ideal fix was tried here, but apparently more work needs to do f019ea0#diff-ad3456d46a980c23853783634a1555a7R37