Skip to content

ReshowComponent

Hill Liu edited this page May 7, 2018 · 1 revision

Extend from ReshowComponent or ReshowRealTimeComponent

!!Important!! If your class overwrited with following functions you need call parent by yourself.

  • componentDidMount
    • super.componentDidMount();
  • componentWillReceiveProps(nextProps)
    • super.componentWillReceiveProps(nextProps);
  • componentWillUnmount
    • super.componentWillUnmount();

Safe way

The safe way was call reshow(YourComponent) again;

import React from 'react';
import {reshow, ReshowComponent} from reshow;

class YourComponent extends ReshowComponent
{
/* your code */
}
export default reshow(YourComponent);

How to call static parent function (calculateState and getStores) by extends ReshowComponent

Dependencies