reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

docs(redux): update enhancers with proper example code

Open frankcalise opened this issue 1 year ago • 1 comments

Please verify the following:

  • [ ] yarn build-and-test:local passes
  • [ ] I have added tests for any new features, if relevant
  • [ ] README.md (or relevant documentation) has been updated with your changes

Describe your PR

  • Closes #1450 with updated documentation
  • Updates docs with the redux code we provide in the example-app

frankcalise avatar Oct 09 '24 12:10 frankcalise

This PR is good. Saved me. The docs currently don't support .js.

I modified it like this to work on .js react native 0.73.6.

const createEnhancers = (getDefaultEnhancers) => {
  if (__DEV__) {
    const reactotron = require("../../ReactotronConfig").default
    return getDefaultEnhancers().concat(reactotron.createEnhancer())
  } else {
    return getDefaultEnhancers()
  }

}

CalvinNFT avatar Oct 11 '24 14:10 CalvinNFT