drizzle icon indicating copy to clipboard operation
drizzle copied to clipboard

Drizzle react plugin for React Native

Open youngkidwarrior opened this issue 5 years ago • 0 comments

The legacy codebase has this paradigm setup for RN

componentDidMount() {
    this.unsubscribe = drizzle.store.subscribe(() => {
      const drizzleState = drizzle.store.getState();
      if (drizzleState.drizzleStatus.initialized) {
        this.setState({ loading: false, drizzleState });
      }
    });
  }
  componentWillUnmount() {
    this.unsubscribe();
  }

How compatible is using Drizzle Context with store.subscribe and is it necessary?

youngkidwarrior avatar May 31 '20 10:05 youngkidwarrior