https://github.com/thetechnocrat-dev/fast-flux-react
removes a lot of the boilerplate code needed when following react flux
https://github.com/thetechnocrat-dev/fast-flux-react
Last synced: 2 months ago
JSON representation
removes a lot of the boilerplate code needed when following react flux
- Host: GitHub
- URL: https://github.com/thetechnocrat-dev/fast-flux-react
- Owner: thetechnocrat-dev
- Created: 2016-07-15T01:33:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-17T04:51:04.000Z (almost 9 years ago)
- Last Synced: 2025-02-15T07:31:16.709Z (4 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fast-flux-react
## docs
require at top of component you want to useex/ var FastFlux = require('../util/fast-flux-react/fastFlux')
then do FastFlux.webCycle(method, url, options)
method: the HTTP method you want to use all lowercase ('put', 'post', or 'get')
url: the back end route you want to hit
options: an object of different options which are defined below
body: object (data to be sent in AJAX, required for post and put requests)
success: function (optional front end successCallback console logs succes message by default)
error: function (optional front end errorCallback console logs error message by default)
shouldStoreReceive: boolean (if the backend data should end up in a store)
storeActionType: the name of the store action that received data (required if shouldReceive is true)example
```javascript
var signUpBody = {
username: this.state.username,
password: this.state.password,
email: this.state.email,
};
FastFlux.webCycle('post', '/signup', {
body: signUpBody,
});
```