Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Use ReactDOM APIs #19

Merged
merged 3 commits into from
Jan 4, 2016
Merged

Use ReactDOM APIs #19

merged 3 commits into from
Jan 4, 2016

Conversation

zpao
Copy link
Member

@zpao zpao commented Nov 16, 2015

This updates ReactJS.php to require that the provided libsrc also has ReactDOM and ReactDOMServer 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

@Finetuned
Copy link

@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

@talyssonoc
Copy link
Contributor

Some news about when it will get merged?

@18601673727
Copy link

We want this got merged please.

@edisonthk
Copy link

We need this pull request to be merged please.

@stroborobo
Copy link

Any news on this one?

@zpao
Copy link
Member Author

zpao commented Jan 4, 2016

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.

zpao added 2 commits January 4, 2016 10:53
Just in case... The bundle approach is preferred since a build step will
likely be necessary regardless and can be integrated into other
processes.
zpao added a commit that referenced this pull request Jan 4, 2016
@zpao zpao merged commit 5691f72 into master Jan 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants