You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.
So i setup react-engine as the view engine with krakenjs and everything has been working fine. My app.js file that bootstraps the client-side looks like the example below and i simply have a folder structure where views contains my server-side rendered pages like index, header, footer, single-listing and views also contains a directory called components which are bundled with browserify... so the problem i just noticed is the server-side and client-side files are being added into my bundle.js file. This was noticeable recently when i tried to do an $.ajax call inside components/AccountActions.jsx which i thought was only client-side.. and i received the error $ is not available or window is not available. I was wondering a few things.
what is the purpose of the require('./views/**/*.jsx', {glob: true});
does viewResolver handle paths for client-side views, server-side views or both?
what is a good way to ensure that my components directory stays client-side and the rest within views is server-side. If it's only client-side where is the path located for server-side views?
If you need any more information feel free to ask :) Thanks!
So i setup react-engine as the view engine with krakenjs and everything has been working fine. My
app.js
file that bootstraps the client-side looks like the example below and i simply have a folder structure whereviews
contains my server-side rendered pages like index, header, footer, single-listing andviews
also contains a directory calledcomponents
which are bundled with browserify... so the problem i just noticed is the server-side and client-side files are being added into mybundle.js
file. This was noticeable recently when i tried to do an$.ajax
call insidecomponents/AccountActions.jsx
which i thought was only client-side.. and i received the error$
is not available orwindow
is not available. I was wondering a few things.require('./views/**/*.jsx', {glob: true});
viewResolver
handle paths for client-side views, server-side views or both?components
directory stays client-side and the rest withinviews
is server-side. If it's only client-side where is the path located for server-side views?If you need any more information feel free to ask :) Thanks!
app.js
The text was updated successfully, but these errors were encountered: