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
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