Hacker News new | ask | show | jobs
by DenisM 3422 days ago
So I see they have a lot of code reuse between RN iOS and RN Android.

How much, if any, code reuse can there be between React Native and React (proper)?

2 comments

You can't re-use the UI portion but all the business logic, API calls, stores, socket connections, etc...

For Sleeperbot it's 50% code-sharing between desktop / mobile, and then 95% between iOS & Android.

Thank you!
Great Q. React and React Native use difference "renderers". I believe that with the right pattern to use a different set of low level components you could manage to reuse a big chunk, but this isn't something we have tried so I'm not that sure.