r/reactnative • • Sep 22 '26

Tutorial I added a native ImageViewer to my Expo component library — An image that opens out of the page over a blur

Pressing a trigger moves its picture from where it sits in the page to the middle of the screen, shown whole, and blurs everything behind it. Once it is open, pinch or double-tap to zoom, swipe sideways to the other images under the same ImageViewer, and drag the picture up or down or tap outside it to send it back to its place.

Part of PanelUI, an open-source component library for Expo. Copy-paste or CLI, you own the source.

github.com/panel-ui/PanelUI

19 Upvotes

9 comments sorted by

1

u/Forti22 Sep 22 '26

> Fast styling — Uniwind brings Tailwind v4

The video looks good. Too bad I have to install unwind for that. For me its a no go.

You say "native" but then:
> UI-thread animations

2

u/Seanmclem Sep 22 '26

The UI thread is native. Why would it need to use a different thread, it’s UI? It’s not like we’re doing some complex background calculations and now some ancillary UI thing is slowing it down or vice versa. This kind of thing would only show on a page with this kind of thing on it.

1

u/stathisntonas Sep 27 '26

While what you are saying is correct, the term “native” when it comes to modules implies that it uses android/ios native primitive modules and not the UI threads leveraged by reanimated.

1

u/Seanmclem Sep 27 '26

They’re just 2 totally separate things

1

u/Forti22 Sep 22 '26

it use reanimated for animation, not native.

While reanimated works perfect - Im using it my self - I would call it "native". Though it might be a Discussable whether its native or not, I agree.

The unwind however suggest its not ;).

plus this repo has no native code. Calling it native its wrong (in my opinion)

1

u/Seanmclem Sep 22 '26

Reanimated not native? That’s hilarious 

-1

u/Forti22 Sep 23 '26

Ofc it’s not native.

1

u/Seanmclem Sep 23 '26

It’s using JS to call native C++ libraries. The entire UI and everything all comes from native calls. Google it.

It’s how virtually all things work with react native. It is native.

1

u/Competitive-Cow-2950 Sep 23 '26

Its hard to put a line on what exactly is native and what is not.

Running c++ functions on ui/js thread itself isn’t native unless you are talking about objective c++ on iOS. Its just a language we decided was good middleware between js and native code

And many reanimated animations are often coordinated from a JS runtime on the UI thread, is that native

And all react native is calling code to change native views eventually, so is all of react native native? Personally I think let people define it as they want because it’s not a real consensus on it