@sitecore-jss/sitecore-jss
Advanced tools
Changelog
19.0.0
[sitecore-jss-react]
[sitecore-jss-nextjs]
Add withDatasourceCheck
higher order component (HOC) to better handle renderings with missing datasources (#723)
[sitecore-jss-*]
Compile and publish all base package as ESM (#758)
[sitecore-jss]
[sitecore-jss-nextjs]
[Dictionary Service] [Sitemap Service] Provide ability to customize jssAppTemplateId (#763)
[sitecore-jss]
Update editing functions for Horizon compatibility (backwards compatible) (#712)
[sitecore-jss-nextjs]
VERCEL_URL
env variable (if available) for generating public URLs (#725)[sitecore-jss-vue]
[samples/nextjs]
[samples/react]
[samples/angular]
[samples/vue]
dataApi
. Replaced by RestLayoutService
and RestDictionaryService
(#744)[samples/react]
[samples/angular]
[samples/vue]
(#773)
--fetchWith
option for jss create
, which selects REST or GraphQL APIs[samples/nextjs]
--empty
flag for jss create
(#754)[samples/vue]
Upgrade version 2.x to 3.x. Simplify dependencies; remove dependency on i18n (#724)
[samples/embedded-app]
Remove dependency on StepZilla (#747)
[samples/node-headless-ssr-proxy]
Remove '/dist' path from pathRewriteExcludeRoutes (#756)
[sitecore-jss-react]
[samples/nextjs]
[samples/react]
Fix double rendering (#775)
[sitecore-jss-react]
Error rendering raw self-closing tag elements in placeholders (#745)
[sitecore-jss-react-forms]
Experience Forms JSS React implementation doesn't use CSS class applied to entire form (#771)
[samples/angular]
Fix issue where dk-DA language is not rendered in connected and disconnected mode (#734)
[samples/react]
Fix 504 (Gateway Timeout) errors for proxied Sitecore requests (visitor identification, media, etc) when running in connected mode (#808)
[sitecore-jss]
[sitecore-jss-vue]
[sitecore-jss-react-native]
[sitecore-jss-react]
[sitecore-jss-nextjs]
[sitecore-jss-angular]
Remove deprecated dataApi
(#744)
[sitecore-jss-*]
[samples/*]
Avoid use of 'any' for TypeScript definitions (#759)
Changelog
18.0.0
All JSS services have been upgraded to support Sitecore Experience Edge GraphQL schema.
[sitecore-jss]
[sitecore-jss-nextjs]
[samples/nextjs]
IncludeServerUrlInMediaUrls
"default" configuration to avoid exposing the Sitecore server publicly when using Experience Edge.[samples/react]
[samples/angular]
[samples/vue]
The samples can also utilize Sitecore Experience Edge. A new sample [samples/node-headless-ssr-experience-edge]
has been adeded to demonstrate how to configure this. Read docs.
[sitecore-jss]
GraphQLDictionaryService
is a new service for fetching dictionary data using GraphQL Read docs.GraphQLLayoutService
is a new service for fetching layout data using GraphQL Read docs.[sitecore-jss-nextjs]
GraphQLSitemapService
easier to customize by allowing overrides of default options. (#682, #705)[sitecore-jss]
Enable debug logging for JSS services using the debug module. Read docs.jss create
command. Read docs.[samples/react-native]
(#624)
<Layout/>
component in order to have shared navigation panel.dataConversation
.[sitecore-jss]
mediaApi.updateImageUrl
now only switches to JSS media handler prefix if imageParams
are sent. Otherwise, the original media URL is returned. Fixes hash errors ("ERROR MediaRequestProtection: An invalid/missing hash value was encountered.") from appearing in Sitecore logs (#681)[samples/nextjs]
[samples/react]
[samples/vue]
jss scaffold
generated files with inconsistent line endings (#684)[sitecore-jss-nextjs]
getStaticPaths
only pre-rendering the first 10 pages (638)[sitecore-jss-react]
Render value instead of array of single value when value doesn't contain line breaks (714)
[sitecore-jss-react-native]
(#624)
style
type for SvgUrI
instead of Array.<HtmlView/>
if editable
is provided.[samples/react-native]
(#624)
src
prop type in disconnected mode. Fix 'Plain image' example in connected mode. Remove unsupported 'Srcset image' adaptive example.params
prop types in connected mode.[samples/node-headless-ssr-proxy]
Fix how header value for 'accept-encoding' is set. This resolves an issue in the Angular sample where the /graphql page caused a console error (#680)
[sitecore-jss-forms]
Fix issue where pre-filled (default) form data isn't removed for multi-valued fields when user de-selects values (#677)
[sitecore-jss-react-native]
Removed dataConversation
, since editable
property not used in disconnected
mode. (#624)
[samples/angular]
Upgrade angular
to v11. (#635)
[samples/nextjs]
Change how a custom query can be used in GraphQLSitemapService. Previous way: pass a formatSearchQuery
function to fetchExportSitemap
or fetchSSGSitemap
. New way: extend the GraphQLSitemapService
class and override the fetchSitemap
method. (#638)
With the added support of GraphQL endpoints, the API surface area of JSS has essentially doubled. As a result, some reorganizing was done in the base packages, which causes breaking changes for how some services, classes and functions are exported. If you have imports from JSS base packages in your project, they may need to be updated per the migration guide table.
There are migration instructions from JSS 15-based applications.
scjssconfig.json
file. resolveScJssConfig
now accepts arguments as an object instead of using individual arguments.ComponentFactory
to allow a component definition instead of an instantiated component. ComponentFactory
returns ComponentType | null
instead of Component
.missingComponentComponent
from React.SFC
(deprecated) to React.FC
.errorComponent
from React.SFC
(deprecated) to React.FC
.RestDictionaryService
to fetch dictionary data using the Sitecore Dictionary Service REST API, and RestLayoutService
to fetch layout data using the Sitecore Layout Service REST API.AxiosDataFetcher
to provide a default data fetcher implementation which can be used in sample apps.GraphQLRequestClient
to provide the ability to execute GraphQL queries.SitecoreContext
to support TypeScript generics.useSitecoreContext
hook..env
file to the CLI.jss deploy
doesn't exit on success.request
and axios
NPM packages with latest version of axios
(>=0.21.1).Cannot read property 'sitecore' of null
, when 404 and routeData is null.errorComponent
prop caused an "Invalid prop" error.rewriteRequestPath
.missingComponentComponent
, resolving an issue with custom "Missing Component" components not working.errorComponent
, resolving an issue with custom "Error" components not working.