Skip to content
This repository was archived by the owner on Dec 15, 2020. It is now read-only.

Add onLoad & onLoadEnd callbacks to Prefetch component. - #407

Open
timoxley wants to merge 1 commit into
facebookarchive:masterfrom
timoxley:prefetch-callback
Open

Add onLoad & onLoadEnd callbacks to Prefetch component.#407
timoxley wants to merge 1 commit into
facebookarchive:masterfrom
timoxley:prefetch-callback

Conversation

@timoxley

@timoxley timoxley commented Nov 28, 2017

Copy link
Copy Markdown

Mirror's Pano's onLoad, onLoadEnd API.

Usage

<Prefetch
  source={asset('image.jpg')}
  onLoad={() => console.log('load success')}
  onLoadEnd={() => console.log('load end')}
/>

Note: CI failure seems to be unrelated.

// call onLoad in React
if (texture !== undefined) {
RCTPrefetch.addToCache(uri, texture);
console.log('ONLOAD', uri, texture)

@matthamil matthamil Feb 17, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to remove the console.log from this.

* Not a maintainer, was just curious about this PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants