Advertisement
Guest User

Untitled

a guest
May 1st, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. import { bindActionCreators } from 'redux';
  2.  
  3. --export const EXAMPLE_ACTION_1 = "TestPanel/EXAMPLE_ACTION_1";
  4. --export const EXAMPLE_ACTION_2 = "TestPanel/EXAMPLE_ACTION_2";
  5. --export const EXAMPLE_ACTION_3 = "TestPanel/EXAMPLE_ACTION_3";
  6. ++export const TOGGLE_PANEL_HEADER = "TestPanel/TOGGLE_PANEL_HEADER";
  7.  
  8. --export const exampleAction_1 = () => ({
  9. -- type: EXAMPLE_ACTION_1
  10. --});
  11.  
  12. ++export const togglePanelHeader = () => ({
  13. ++ type: TOGGLE_PANEL_HEADER
  14. ++});
  15.  
  16. --export const exampleAction_2 = (arg1) => ({
  17. -- type: EXAMPLE_ACTION_2,
  18. -- payload: {
  19. -- arg1
  20. -- }
  21. --});
  22.  
  23. --export const exampleAction_3 = (arg1, arg2) => (dispatch, getState) => {
  24. -- dispatch({
  25. -- type: EXAMPLE_ACTION_3,
  26. -- payload: {
  27. -- arg1,
  28. -- arg2
  29. -- }
  30. -- });
  31. --};
  32.  
  33. export const containerActions = (dispatch) => bindActionCreators({
  34. -- exampleAction_1,
  35. -- exampleAction_2,
  36. -- exampleAction_3
  37. ++ togglePanelHeader
  38. }, dispatch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement