infinitered / infinitered/reactotron

Can't push to arrays in `reactotron-core-client`

Open
#1,289 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :beetle:
Dominant language
TypeScript
Stars
15.6k
Forks
972
PR merge metrics
No merged PRs in 30d

Description

Error when using the latest beta release and upgrading React Native.

Screenshot 2023-04-20 at 4 41 27 PM

### Steps to reproduce the issue.
1. Checkout to https://github.com/infinitered/ignite/pull/2377
2. Checkout to https://github.com/infinitered/reactotron/pull/1288
3. Update this metro config in `ignite/boilerplate/metro.config.js`Screenshot 2023-04-20 at 4 38 38 PM
5. Run `npx zx scripts/install-workspace-packages-in-target.mjs ~/Code/ignite/boilerplate/` from reactotron repo
6. Run `yarn start` and `yarn ios` in ignite/boilerplate repo

### Context
Tried getting around this by updating the property
Screenshot 2023-04-20 at 4 46 20 PM

But this caused another issue where non-core plugins weren't getting initialized correctly like in reactotron-mst.

Seems like that mutating class properties causes some funky business with prototypes: https://stackoverflow.com/questions/57037585/why-we-cannot-add-a-new-property-to-an-object-constructor-the-same-way-we-add-a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure using the referenced Ignite and Reactotron pull requests, the change in ignite/boilerplate/metro.config.js, the workspace-package install command, and yarn start/yarn ios. Investigate the array behavior in reactotron-core-client alongside the reported prototype issue. Done means arrays can be pushed after the upgrade and non-core plugins such as reactotron-mst still initialize correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
devtools, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.