Hi all!,
I’m very happy to announce the first release of the BloomReach Experience SDK for React. This library makes integrating a React app with BloomReach Experience a breeze. It supports both client-side- and server-side rendered/isomorphic React apps.
With this library only a couple lines of code are required to have BRE power your React app:
import React from 'react'
import { CmsPage, RenderCmsComponent } from 'bloomreach-experience-react-sdk'
const componentDefinitions = {
"MyCustomComponent": { component: MyCustomComponent }
}
class MyApp extends React.Component {
render() {
const currentUrl = window.location.href.pathname
return (
<CmsPage componentDefinitions={componentDefinitions} url={currentUrl}>
{ () =>
<RenderCmsComponent />
}
</CmsPage>
)
}
}
You can find the SDK and further instructions on Github.
Hope this will make things easier for you. Let me know if you have any questions or feedback!
Robbert