reactjs / react-php-v8js

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

react-php-v8js with React 16.1.1 #34

Open tiefenb opened 6 years ago

tiefenb commented 6 years ago

Does react-php-v8js work with the newer version of react?

When I try to make it work with 16.1.1 and following code:

class Table extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    var rows = this.props.data.map(function (row) {
      var cells = row.map(function(cell) {
        return <td>{cell}</td>;
      });
      return <tr>{cells}</tr>;
    });
    return (
      <table>
        <tbody>{rows}</tbody>
      </table>
    );
  }
}

I get this Error: V8Js::compileString():1007: TypeError: Super expression must either be null or a function, not undefined

tiefenb commented 6 years ago

When I try var_dump(React.Component) it say it is NULL