Skip to content

A simple Thrift service for prerendering React Components on the server-side using nodejs

License

Notifications You must be signed in to change notification settings

ymichael/react-thrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Thrift

A simple Thrift service that enables prerendering of React Components on the server-side using nodejs.

service ReactThrift {
    // Given a React component's name and its props, returns the html rendered.
    string renderComponentToString(1:string name, 2:string props)
        throws (1:ServerException err),
}

Usage

  • Register React components and start server.
var s = new Server();
s.registerComponent("Component1", Component1);
s.registerComponent("Component2", Component2);
s.registerComponent("BuggyComponent", BuggyComponent);
s.listen(9090);
  • Use whatever server-side language to make RPC to said server.

Credits

About

A simple Thrift service for prerendering React Components on the server-side using nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published