Closed zpao closed 8 years ago
@zpao Yes, that works.
$ls = array();
$ls[] = "print('RDS Keys = ' + Object.keys(global.ReactDOMServer));";
$req = implode(";\n", $ls);
echo $this->executeJS($req);
returns
RDS Keys = renderToString,renderToStaticMarkup,version
Some news about when it will get merged?
We want this got merged please.
We need this pull request to be merged please.
Any news on this one?
Sorry for the delay. I think I might end up doing this slightly differently now that we ship react-dom-server.js which has the API we want, as opposed to building our own package (even though that is easy). I'll take a look today.
This updates ReactJS.php to require that the provided
libsrc
also hasReactDOM
andReactDOMServer
exposed as globals. I think this ultimately is the best path forward for the time being.I updated the example to build such a bundle. But I don't have PHP set up right to run this so I haven't actually tested this. Anybody want to sanity check this?
CC people who have filed issues recently @Finetuned @daslicht @tauseefk