Sails React
Installation
You need sais.io.socket and sails-hook-babel
$ npm install sails-react-store sails-hook-babel --save
Usage
for record's collection
"use strict"; { return <div className="post"> <h5 className="post-title">thisstateitemtitle</h5> <p className="post-content">thisstateitemcontent</p> </div> } //// { return <span className="doc-title">thispropsitemtitle</span> } { return <div className="posts"> thisstateitems </div> }
and use like that when no attributes items => get request /post
<PostCollection identity="post" />
or if you want to add manually items
<PostCollection identity="post" items= />
for one record
<PostItem identity="post" item=title:'a title' content: 'a text content' />
License
MIT © 2015 contributors