21.10.0
🛠 Breaking Changes
[sitecore-jss]
[sitecore-jss-react]
[sitecore-jss-nextjs]
[create-sitecore-jss]
[sitecore-jss-react-forms]
Upgrade React to version 19 and Nextjs to version 15 (#2078)(#2084) (#2093) (#2103):- upgrade React and Nextjs dependencies for the new major versions
- with React 19, JSX is in the 'react' namespace and therefore 'react' needs to be imported befoore using JSX. All OOTB react and nextjs components have been updated
react-test-renderer
has been deprecated in react 19. additionalyenzyme
is not supported anymore so all unit tests have been migrated to use@
testing-library/react`propTypes
have been deprecated by react and have been removed from the solution- in NextJs 15 the
geo
andip
properties onNextRequest
have been removed. To account for this@sitecore-cloudsdk
dependencies have been upgraded to 0.5.1, which includes breaking changes, see upgrade guide for details. Also cloudsdk v0.4.0 introduces breaking changes- replaces the old init approach for cloudsdk with new one according to upgrade guide. This causes several followup changes.
- Context logic is no longer used
- New object type is passed into
FEAAS.setContextProperties
instead of context passed previously @sitecore/components
dependency updated to 2.0.0- Browser-side CloudSDK is initialized in Bootstrap component. It should be initialized for events to work.
- remove 'react' dependency from nextconfig webpack externals in monorepo next config plugin as it is not needed anymore.
- PersonalizeMiddleware handler now accepts PersonalizeOptions, that can be used to provide geolocation data from application level
eslint-plugin-react
depenency has been upgraded to latest[templates/nextjs]
graphql
has been upgraded to 15.10.1[templates/nextjs-styleguide]
[templates/nextjs-styleguide-tracking]
styleguide components types have been fixed