-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade React Redux and Redux Form (#37438)
* fix(deps): update dependency redux-form to v8 * fix(deps): update dependency react-redux to v7 * ImageEditorCanvas: change react-redux withRef to forwardRef, modernize the component React Redux ref API has changed in 7.0.0. Modernization includes: - use modern refs - use arrow functions for bound methods - every variable has its own `const` decl * Zoninator Search Autocomplete: change react-redux withRef to forwardRef * Notifications: use react-redux forwardRef to get list element * Get Redux store from new React context in TinyMCE wrappers * WebPaymentBox unit test: pass mock Redux store by wrappingComponent enzyme option Instead of using the legacy React context, which is an implementation detail of particular React Redux version, use the Enzyme's `wrappingComponent` option to render a mock Redux provider above the tested component. * WithContactDetailsValidation Unit Test: pass Redux store as wrappingComponent, use full mount React Redux 7.x no longer supports `store` prop for `Provider`, and uses the new `React.createContext()` instead of the legacy context. That requires an update of the unit tests. - use `wrappingComponent` option to activate a mock Redux provider - switch to full mount, as `wrappingComponent` doesn't work with `useContext` in Enzyme (enzymejs/enzyme#2176) * Jetpack Connect Help Button: convert to hooked functional component with useDispatch * PluginsList: rewrite tests to use Enzyme * DomainManagement.List: rewrite tests to use Enzyme
- Loading branch information
Showing
20 changed files
with
363 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.