tunoltd / emoji-mart-native

One component to pick them all 👊🏼
https://tunoltd.github.io/emoji-mart-native
BSD 3-Clause "New" or "Revised" License
86 stars 31 forks source link

Scroll causing iPhone to Resrping #196

Closed destinybonavita closed 2 years ago

destinybonavita commented 4 years ago

Describe the bug I added <NimblePicker set='apple' data={data} /> to one of my components and when I go to scroll my iPhone resprings and reboots.

To Reproduce I simply installed the module, added it to my component and tried to scroll.

Expected behavior It scrolls normally 😅

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context My project is using the newest version of Expo if that helps.

destinybonavita commented 4 years ago

I also tried with using import { ModalPicker } from 'emoji-mart-native' and scrolling anywhere is causing a respring

destinybonavita commented 4 years ago

(Sorry to keep commenting)

It seems that the problem is tied to loading more data. I clicked one of the categories and that caused the respring as well

destinybonavita commented 4 years ago

After a little more testing, it appears the problem is because of the emoji sheet size. Bringing it down to 16 stopped the crashes.

destinybonavita commented 4 years ago

Each emoji does take quite a bit of time to load in though, about 15+ seconds each.

pederjohnsen commented 4 years ago

Thanks for reporting this bug @destinybonavita :)

I've not had much time yet to properly test this on iOS, and not tested with expo at all.

For the load time, are you using local sprite sheets? if not, I would recommend you do and include the assets in the app package. This should give you the best performance load wise. https://github.com/tunoltd/emoji-mart-native#spritesheetfn

destinybonavita commented 4 years ago

Hi @pederjohnsen !

Thanks for getting back so quickly. I did try to use local sprites, but I might not of been including them in the app package correctly.

I did realize that there's a native property and that did exactly what I needed it to. Working great now!

Thanks :)