You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With React 19, defaultProps will continue to be supported for class components (ref) and have been removed from function components in our codebase.
However a console warning exists on the Jetpack Settings page:
Warning: Connect(SettingsForm): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead
The full stack trace, though hard to parse, indicates the issue is with the react-redux connect function and how we are using it.
react-dom.development.js:86 Warning: Connect(SettingsForm): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.
at ConnectFunction (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:9281:68)
at div
at div
at ThemeProvider (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:18910:3)
at Settings (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:66197:1)
at C (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:11976:37)
at ConnectFunction (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:9281:68)
at div
at div
at div
at Main (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:54936:5)
at C (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:11976:37)
at http://localhost/wp-includes/js/dist/data.js?ver=6f178ef23ef546c51cae:4489:25
at ConnectFunction (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:9281:68)
at Route (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:11719:29)
at Switch (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:11921:29)
at Router (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:11338:30)
at HashRouter (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:10812:35)
at Provider (http://localhost/wp-content/plugins/jetpack/_inc/build/admin.js?ver=69be9abf13d65df6e8c0:8992:20)
at div
The issue appears to be with the children passed into the ThemeProvider component in the Settings class - /projects/plugins/jetpack/_inc/client/settings/index.jsx - these all have a 'type' of Symbol(react.memo) when children is logged into the console.
Solution
On more investigation, it appears as though the issue is the SearchableModules component passed into ThemeProvider via Settings - SearchableModules uses defaultProps. None of the others do (and the 'type' mentioned above was a red flag).
Issue
With React 19, defaultProps will continue to be supported for class components (ref) and have been removed from function components in our codebase.
However a console warning exists on the Jetpack Settings page:
The full stack trace, though hard to parse, indicates the issue is with the react-redux connect function and how we are using it.
The issue appears to be with the children passed into the
ThemeProvider
component in the Settings class -/projects/plugins/jetpack/_inc/client/settings/index.jsx
- these all have a 'type' ofSymbol(react.memo)
when children is logged into the console.Solution
On more investigation, it appears as though the issue is the
SearchableModules
component passed intoThemeProvider
viaSettings
-SearchableModules
usesdefaultProps
. None of the others do (and the 'type' mentioned above was a red flag).Parent issue: #37951
The text was updated successfully, but these errors were encountered: