This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
$this->v8->executeString() needs to be echoed in ReactJS.php #2
Open
Description
I did a cURL on the page I set up to verify that PHP had indeed echoed both the markup and the JS, and what I found was that the JS was outputted, but the markup didn't get generated until the page loaded (curl request resulted in <div id="page"></div>
). When I inspected the table element, the data was there, so the JS initialized it. If you view source immediately, you'll see an empty #page as well.
Since you have an output buffer in ReactJS::getMarkup()
, you have to echo, like so:
ob_start();
*echo* $this->v8->executeString($js);
return ob_get_clean();
Once I added the echo and did a cURL request, I noticed that the markup was actually there before the JS had a chance to render it.
I'd put in a pull request, but I just wanted to verify that this was intended behavior and I wasn't missing anything.
Metadata
Metadata
Assignees
Labels
No labels