Skip to content

Conversation

@blazejkustra
Copy link
Contributor

@blazejkustra blazejkustra commented Oct 23, 2025

Built on top of #228

To test, go to the example app and do yarn web, then open http://localhost:8081/

@blazejkustra blazejkustra changed the title Add web support (Take 3) WIP: Add web support (Take 3) Oct 23, 2025
@blazejkustra blazejkustra changed the title WIP: Add web support (Take 3) Add web support (Take 3) Oct 23, 2025
@blazejkustra blazejkustra marked this pull request as ready for review October 23, 2025 20:57
@blazejkustra
Copy link
Contributor Author

I decided to give it a go as there was no progress on the other PR.

@wcandillon Let me know what do you think! 🎉

Tested on native devices:

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-10-23.at.23.01.18.mp4

And web:

Screen.Recording.2025-10-23.at.23.02.55.-.03.mp4

@wcandillon
Copy link
Owner

This looks very cool and interesting. Also it looks like you added Web support the RNTA which is very cool. I need to see how you did it so I can also do it for the RNTA in RN Skia :) :)

@wcandillon wcandillon self-requested a review October 24, 2025 07:55
@blazejkustra
Copy link
Contributor Author

Also it looks like you added Web support the RNTA which is very cool

Wait… did I? 😆 What does RNTA stand for?

@wcandillon
Copy link
Owner

@blazejkustra RNTA stands for React Native Test App: https://github.com/microsoft/react-native-test-app The reason is that expo app weren't supporting monorepos then (now it might be different). The main weakness of RNTA is that it doesn't support Web but you seem to have found a nice workaround :)

@blazejkustra
Copy link
Contributor Author

but you seem to have found a nice workaround :)

Pure luck 🙌

@blazejkustra
Copy link
Contributor Author

FYI I was testing the web setup in my app and the app was crashing randomly on ios and android. Turned out that the trick with wrapping the native module in utils.ts wasn't working reliably on native devices so decided to try a different approach. Works on all platforms now 👍

@blazejkustra
Copy link
Contributor Author

@wcandillon what's the plan with the web support, shall I resolve conflicts now or wait?

@wcandillon
Copy link
Owner

I apologies for having left this aside for now, I was doing some big improvement to the library.
There is strong appetite for this PR.
The conflicts look trivial, I will fix them now and do a first round of review.

Copy link
Owner

@wcandillon wcandillon left a comment

Choose a reason for hiding this comment

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

This is fantastic. I am very excited about this. It all looks and works fantastic. My only question is regarding the creation of the main folder. why do we have this folder now?

@wcandillon wcandillon self-requested a review November 3, 2025 16:34
@blazejkustra
Copy link
Contributor Author

My only question is regarding the creation of the main folder. why do we have this folder now?

It’s there to differentiate between platforms so we can have platform-specific files: one implementation for native and another for web.

I added a catalog to separate these implementations. We could also have used main.web.ts and main.ts; it’s mostly a matter of preference.

@wcandillon wcandillon merged commit 578ad98 into wcandillon:main Nov 3, 2025
5 checks passed
@blazejkustra blazejkustra mentioned this pull request Nov 3, 2025
Comment on lines +69 to +73
size = viewRef.current.getBoundingClientRect();
} else {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
size = viewRef.current.unstable_getBoundingClientRect();

Choose a reason for hiding this comment

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

This is unified in the latest version of React Native, should unify when Expo 55 drops in January.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants