SHARE
TWEET

Untitled

a guest Mar 26th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from "react";
  2. import { getFirstAndSecondAction } from "actions/getFirstAndSecondAction";
  3.  
  4. class MyComponent extends Component {
  5.   static async getInitialProps({ store }) {
  6.    
  7.     // Trigger the saga sequence
  8.     store.dispatch(getFirstAndSecondAction());
  9.    
  10.     return {};
  11.   }
  12.   render() {
  13.     return (
  14.       <div>
  15.         <p>My Component</p>
  16.       </div>
  17.     );
  18.   }
  19. }
  20.  
  21. export default MyComponent;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top