Closed unbug closed 9 years ago
I would add a prop to DefaultLayout, something like additionalScripts, then render those.
Note: this isn't an issue with this module, and is more a general question. That's why I closed it.
@zpao Brilliant idea.Thanks man.
@unbug
I wrote some sample for this case, it may help you. https://github.com/ShinyChang/React-Server-Render-Example/blob/master/app.js https://github.com/ShinyChang/React-Server-Render-Example/blob/master/views/layouts/default.jsx
@ShinyChang Yep,that's the way.
So,I got a default layout like this,the common javascript is import in the bottom of the page.
But in another page,I need to import another js file,
But in this case,the
Forms.add.js
wont loader after all the js files in theDefaultLayout
layout.so I create a script component.All my js files has to wrap in a
div
.How to do this in a right way?