Relay-inspired library based on Promises instead of GraphQL.
Inspired by: Building the Facebook Newsfeed with Relay (React blog)
npm install react-transmit
import React from "react";
import Transmit from "react-transmit";
const Newsfeed = React.createClass(...);
export default Transmit.createContainer(Newsfeed, {
queryParams: {
count: 10
},
queries: {
stories (queryParams, prevProps) {
// All Transmit queries return a Promise.
return Promise.all([
Story.getQuery("story")
]);
}
}
});
Let's start one together! After you ★Star this project, follow @Rygu on Twitter.
BSD 3-Clause license. Copyright © 2015, Rick Wong. All rights reserved.