reactjs / react-php-v8js

PHP library that renders React components on the server
Other
1.33k stars 127 forks source link

Syntax error : Unexpected token > #26

Closed Pakinwet closed 8 years ago

Pakinwet commented 8 years ago

HI

Do you have any idea why I'm getting this error below when trying to add this in example.php

include '../ReactJS.php';

$rjs = new ReactJS(
  // location of React's code
  file_get_contents('https://fb.me/react-15.2.0.js'),
  // app code
  file_get_contents('./src/table.js')
);
print_r($rjs);die;

V8Js::executeString():20225: SyntaxError: Unexpected token >

zpao commented 8 years ago

file_get_contents('./src/table.js')

That probably has JSX in it. You'll need to transform that code before you can run it.