Nine Pedestrians Mesmerized
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

router-execute-action-provider

2.0.1 • Public • Published

execute-action-provider

Provide fluxible`s executeAction into the compoment with third parameter redirecting user via react-router. You can use it as decorator too.

NPM version

Install

npm install execute-action-provider

Support us

Star this project on GitHub.

Usage provideExecuteAction

Decorator

import React, { Component } from 'react';
import { provideRouterExecuteAction } from 'router-execute-action-provider';
 
@provideRouterExecuteAction
export default class Example extends Component {
  onSubmit() {
    const { executeAction } = this.props;
    executeAction(yourAction, yourPayload, { to: '/books' });
  }
}
```
 
### Function
 
```js
import React, { Component } from 'react';
import { provideExecuteAction } from 'fluxible-provider';
 
class Example extends Component {
  onSubmit() {
    const { executeAction } = this.props;
    executeAction(yourAction, yourPayload);
  }
}
 
export default provideExecuteAction(Example);
```
 
## Usage provideGetStore
 
TODO
 
## Try our other React components
 
 - Translate your great project [react-translate-maker](https://github.com/CherrySoftware/react-translate-maker)
 - Forms [react-form-controlled](https://github.com/seeden/react-form-controlled)
 - Google AdSense via Google Publisher Tag [react-google-publisher-tag](https://github.com/seeden/react-google-publisher-tag)
 
# Support us
 
Star this project on [GitHub][github-url].
 
## Credits
 
[Zlatko Fedor](http://github.com/seeden)
 
## License
 
The MIT License (MIT)
 
Copyright (c) 2016 Zlatko Fedor zlatkofedor@cherrysro.com

install

npm i router-execute-action-provider

Downloadsweekly downloads

14

version

2.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar