Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite wrapper code to properly support cases when devtools connect with some delay #375

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

kmagiera
Copy link
Member

This PR rewrites the logic responsible for dealing with devtools agent inside the main app wrapper that's a part of RNIDE runtime.

The previous implementation was quite messy and not well organized. Specifically, handling changes of some of the callbacks wasn't implemented properly and might've resulted in certain events triggering old versions of callbacks.

This rewrite aims to organize this implementation a bit better. Here are some key points of the work being done here:

  1. we extract individual elements into separate effects with proper dependency arrays
  2. we make sure that event callbacks registered with devtools agent are also disconnected
  3. properly handle the case when layout event comes before agent is present (before we'd never trigger "app ready" event in such case

Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 9:52pm

@kmagiera kmagiera merged commit d6fb1a8 into main Jun 12, 2024
2 checks passed
@kmagiera kmagiera deleted the kmagiera/rewrite-wrapper branch June 12, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant