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 Jul 19, 2019. It is now read-only.
I am currently running PHP7.0 on Ubuntu 15.10 with the latest version of V8, and with V8JS for PHP7.0. I should also note the I am using the following react files as the source for react: react.min.js, react-dom.min.js, and react-dom-server.min.js.
EDIT 1: Turns out it only renders the literal JSX markup when I pass the component name as a string literal like so: "'Hello'", whenever I pass the the component name to the method like so: 'Hello' just as a regular string it raises this error:
V8Js::compileString():1: ReferenceError: Hello is not defined
Stating that the component is undefined.
EDIT 2: Here's the code for the React component I'm trying to render:
The method
getMarkup()
returns the literal JSX component, instead of the compiled HTML markup like you would expect.Here's the code that I am running:
And here's what the value of
$markup
is after I call thegetMarkup()
method.I am currently running PHP7.0 on Ubuntu 15.10 with the latest version of V8, and with V8JS for PHP7.0. I should also note the I am using the following react files as the source for react:
react.min.js
,react-dom.min.js
, andreact-dom-server.min.js
.EDIT 1: Turns out it only renders the literal JSX markup when I pass the component name as a string literal like so:
"'Hello'"
, whenever I pass the the component name to the method like so:'Hello'
just as a regular string it raises this error:Stating that the component is undefined.
EDIT 2: Here's the code for the React component I'm trying to render:
EDIT 3: I managed to fix the issue by adding
global.Hello = Hello;
to the end of the JS file.The text was updated successfully, but these errors were encountered: