Disable render debouncing
Summary: This change kinda reverts D21690494, which broke the layout plugin. The layout plugin broken because it's implementation assumes that if `this.props.setPersisted` state is called, those changes are immediately reflected in `this.props.persistedState`. For that to work it means that a render needs to be triggered immediately and synchronously by React. That is a troublesome assumption (React doesn't actually guarantee this) and very likely to break in the future if implementation details change in React or Redux. However, since this is an assumption here, probably more plugins rely on that behavior, so this diff reverts that change. I'll add it the the component library plan to fundamentally address this. The next diff will re-introduce debouncing, just at a different code point. Reviewed By: jknoxville Differential Revision: D21840282 fbshipit-source-id: af69dbded80aa73dfd6558d7cb0268ea0b1c504a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f164da5175
commit
d70b620fae
@@ -384,12 +384,6 @@ class PluginContainer extends PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
// Let's make sure we reive new props in bursts of 200 ms, rather than continously
|
||||
const DebouncedPluginContainer = debounceRender(PluginContainer, 100, {
|
||||
leading: true,
|
||||
trailing: true,
|
||||
});
|
||||
|
||||
export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||
({
|
||||
connections: {
|
||||
@@ -462,4 +456,4 @@ export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||
setStaticView,
|
||||
starPlugin,
|
||||
},
|
||||
)(DebouncedPluginContainer);
|
||||
)(PluginContainer);
|
||||
|
||||
Reference in New Issue
Block a user