Open tdfairbrother opened 8 years ago
I think I worked it out, does this look correct?
const createElement = () => {
return {
renderContainer: (Component, props) => {
if (Component.populateStore) {
Component.populateStore(store, props);
}
return React.createElement(Component, props);
}
};
};
const renderWithMiddleware = applyRouterMiddleware(
useRelativeLinks(),
createElement()
);
Cheers
Can you please give me an example of how to use the render method with createElement?
I would really like to use relative links but as soon as I drop in the render method on the Router, it doesn't run createElement.
Kind Regards, Tim