I think a new React best practice will become: handleClick() { this.setState({ active: true }); requestIdleCallback(this.props.onAction); }
Conversation
We do that in UIKit; it has lead to some pretty surprising results since other things may be calling requestIdleCallback…
1
3
Gotta be very careful about what you assume about the world when that callback is invoked vs. when the touch event arrived…
Replying to
Yea, we're looking to do something slightly different than just raw rIC. handleAction(props, state) { ... return newState; }
2
3
Yeah, absolutely. I think this can be great if there’s holistic control over timing.
1
1
Show replies

