Closed solkaz closed 7 years ago
What exactly does this fix?
Currently, when a new parser is loaded, removeDeprecatedFiltersFromState
will be called on the current app state, and then restoreState
will be dispatched after that. This is unnecessary if the filters object hasn't changed, though, so this adds a check to see if it's necessary to call restoreState
, which can prevent an unnecessary re-render
It's just an optimization, it doesn't "fix" any bugs
Description
When loading a new parser, checks if the new filters returned from
removeDeprecatedFiltersFromState
differs from the old filters; if it hasn't changed, thenrestoreState
will not be dispatchedMotivation and Context
Minor optimization
Checklist:
Browsers