metro icon indicating copy to clipboard operation
metro copied to clipboard

feat: add custom event handlers for HMRClient

Open tjzel opened this issue 2 months ago • 0 comments

Summary

Currently there's no API in JavaScript to listen to HMRClient updates. This is problematic if a library wants to replace modules used on JavaScript runtime different than the one created by React Native.

This PR adds a global array of event handlers, HMRClientOnUpdate, which is available very early and which every library can access to obtain HMR updates.

Changelog: [Feature] add custom event handlers for HMRClient

Test plan

I don't know how you'd test this change in the repo. I applied these changes in Reanimated monorepo and everything worked well.

tjzel avatar Oct 08 '25 13:10 tjzel