0

I wonder has anyone or team tried fully use Skia to render all components with React? Kind of of doing what Flutter is doing but with JS + React.

I know this may not make sense as you may think "just use Flutter", my point is to know why it doesn't work even if Flutter never existed.

Mars
  • 873
  • 1
  • 11
  • 24

1 Answers1

0

I never really thought about something like that, but I guess that should be possible. On the other hand I assume you need a quite specific scenario that this would make sense as you have no common primitive available. If you are strictly staying within Skia there is no navigation and such things, which you then would need to reimplement yourself.

If you have a game that has very little logic for navigation and things that might however make sense to do.

In my experience it is usually way more reasonable to have normal RN views that are extended by a few Skia views here and there.

Interesting is that you can by now more easily add click handler to Skia views which originally was more difficult to do and you can snapshot views to use those within your Skia canvas which generally increases interoperability between standard RN and Skia quite a lot.

Do you have a specific use case in mind when asking?

baumstumpf
  • 137
  • 2
  • 8
  • im thinking of porting RN to a special system which doesn't have native UI components provided. – Mars Aug 24 '23 at 17:24
  • In that case you should have a look at this project: https://github.com/react-native-skia/react-native-skia There they are doing exactly that. – baumstumpf Aug 25 '23 at 15:11