UNPKG

@bbc/spartacus

Version:
22 lines (16 loc) 477 B
/* * This file setups up the SPArtacus client (app) */ /* eslint-disable react/jsx-filename-extension */ import React from 'react'; import 'babel-polyfill'; import { hydrate } from 'react-dom'; import { ClientApp } from './app'; const setupClient = ({ data, routes, module }) => { const root = document.getElementById('root'); hydrate(<ClientApp data={data} routes={routes} />, root); if (module.hot) { module.hot.accept(); } }; export default setupClient;