react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Getting notified when content has first appeared in the root view

Open ide opened this issue 11 years ago • 4 comments

On iOS, you can learn when the RCTRootView first renders content, which is useful for knowing when to fade out a loading screen for example. There currently isn't an equivalent on Android so we're simply polling, which actually works well but it'd certainly be nice to have an event.

For the API one idea is to define a RootView.Listener class that is notified of this event. We can write the implementation if that's helpful.

ide avatar Nov 17 '15 23:11 ide

cc @dmmiller who's focusing on API parity. PRs are always welcome :)

mkonicek avatar Nov 18 '15 00:11 mkonicek

This can be useful to show a splash screen until React Native does it's thing. Currently it shows only a white screen.

satya164 avatar Nov 27 '15 01:11 satya164

There doesn't seem to be a good event on Android equivalent to what exists on iOS which makes it really hard to implement. If someone does have a good idea of how to detect it on Android, I'd be happy to look further.

dmmiller avatar Nov 27 '15 14:11 dmmiller

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/getting-notified-when-content-has-first-appeared-in-the-root-view

ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

mkonicek avatar Apr 10 '16 16:04 mkonicek