I'm trying to render Redux + Webpack in PHP. My current workflow is as simple as below.
- Compile ES6 into js using babel
- Use PHP V8 classes to include scripts from step #1
- Render contents
- Include javascripts used in #1 with script tags.
Everything works fine, except that the included script in #4 re-renders the same view since the route matches. In the route, I have the following configuration.
<Provider store={store}>
<div style={{ height: '100%' }}>
<Router history={browserHistory} children={routes} />
</div>
</Provider>
Is there a way to pass a parameter to the Router
component to register routes, but not execute them?