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
I've been trying to get this to work for React with server side rendering, and I'm curious whether you have ever tried that. If that could work, that could be a great way to bridge the gap with React based SPAs, and the need for server side rendering on PHP hosts that don't support running JS (no V8 extension, etc.).
I did a quick test where I tried to bundle a little hello world React component with JSPM (using defaults - bundle everything with SystemJS and default babel - ES5 - settings). It didn't work though, giving me an error about being unable to convert undefined or null.
Even better may be to use babel to convert JSX to ES6 compatible code in individual modules, and use the package import support that seems to exist within js2php. Do you think something like this could work?
I still also have to work out how to pull in npm modules (like React and ReactDOM) in an effective way.
Great project - thanks!
The text was updated successfully, but these errors were encountered:
This project is not intended for heavy code conversion such as porting libraries completely, as it still lacks a lot of JavaScript features and has some known issues. It might be safe to use for very tiny pieces of code, other than that I wouldn't trust its output.
Hi,
I've been trying to get this to work for React with server side rendering, and I'm curious whether you have ever tried that. If that could work, that could be a great way to bridge the gap with React based SPAs, and the need for server side rendering on PHP hosts that don't support running JS (no V8 extension, etc.).
I did a quick test where I tried to bundle a little hello world React component with JSPM (using defaults - bundle everything with SystemJS and default babel - ES5 - settings). It didn't work though, giving me an error about being unable to convert undefined or null.
Even better may be to use babel to convert JSX to ES6 compatible code in individual modules, and use the package import support that seems to exist within js2php. Do you think something like this could work?
I still also have to work out how to pull in npm modules (like React and ReactDOM) in an effective way.
Great project - thanks!
The text was updated successfully, but these errors were encountered: