infinitered / infinitered/reactotron
Deprecate `reactotron-react-js` and move functionality into `reactotron-react-native`.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.6k
- Forks
- 972
- PR merge metrics
- No merged PRs in 30d
Description
At least internally, most uses of Reactotron for web are either Expo web or react-native-web exports of a React Native app.
In Ignite, we need to an awkward re-export of ReactotronClient to get our Reactotron config to work properly https://github.com/infinitered/ignite/blob/master/boilerplate/app/devtools/ReactotronClient.web.ts
reactotron-react-js is not a lot of code, it is:
- a different set of client defaults https://github.com/infinitered/reactotron/blob/master/lib/reactotron-react-js/src/index.ts#L28-L42
- an alternative implementation for
trackGlobalErrorshttps://github.com/infinitered/reactotron/blob/master/lib/reactotron-react-js/src/plugins/track-global-errors.ts
These can be inlined into reactotron-react-native with .web.ts alternatives. This is a more familiar pattern to React Native libraries since Metro handles bundling platform extensions.
Now that we can ship source code in Reactotron and let Metro bundle it, this pattern would be easier to use.
TODO:
- figure out how to handle platform extensions in Rollup bundle.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/reactotron-react-js/src/index.ts and lib/reactotron-react-js/src/plugins/track-global-errors.ts, then compare their defaults and behavior with reactotron-react-native. Investigate how Rollup handles the proposed .web.ts platform extensions, and use the existing Ignite ReactotronClient.web.ts re-export as a compatibility case. Done means the web functionality is available through reactotron-react-native and the separate package can be deprecated without breaking that setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100