React SSR:14.4 : Not rendering in XM

Hi

I have setup the react SSR sample code and upgraded a cms BE from 14.2 to 14.4 . Now I am able to render the content from cms in the react SSR.

But I am not able to load the application in experience manager in the CMS. It is throwing the following error in the react ssr terminal

TypeError: Object.fromEntries is not a function
at createManageContentButton (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/@bloomreach/spa-sdk/dist/index.js:1438:30)
at ButtonFactory.create (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/@bloomreach/spa-sdk/dist/index.js:988:48)
at PageImpl.getButton (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/@bloomreach/spa-sdk/dist/index.js:1095:39)
at BrManageContentButton.render (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/@bloomreach/react-sdk/dist/index.js:99:36)
at processChild (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/react-dom/cjs/react-dom-server.node.development.js:3134:18)
at resolve (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/react-dom/cjs/react-dom-server.node.development.js:2960:5)
at ReactDOMServerRenderer.render (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/react-dom/cjs/react-dom-server.node.development.js:3435:22)
at ReactDOMServerRenderer.read (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/react-dom/cjs/react-dom-server.node.development.js:3373:29)
at renderToString (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/react-dom/cjs/react-dom-server.node.development.js:3988:27)
at Object.renderPage (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/next/dist/next-server/server/render.js:53:851)
at Function.getInitialProps (webpack-internal:///./node_modules/next/dist/pages/_document.js:135:19)
at loadGetInitialProps (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/next/dist/next-server/lib/utils.js:5:101)
at renderToHTML (/Users/salininair/Learning/brxm/spa-sdk/examples/react-ssr/node_modules/next/dist/next-server/server/render.js:53:1142)
at process._tickCallback (internal/process/next_tick.js:68:7)

Could you please help me to resolve it?

`

This issue is resolved when the following steps are executed

First install react-app-polyfill:
npm install react-app-polyfill
Then import to the top of your index.jsx before import React:
import ‘react-app-polyfill/stable’;

1 Like