Link to home
Start Free TrialLog in
Avatar of Jeffrey Dake
Jeffrey DakeFlag for United States of America

asked on

Advice on building react components to be able to reuse for react-native

Hey everyone,


We have a team building out our dashboard using react and redux.  We are wanting to make an app that will function the exact same way.  We are hoping we will be able to use this on apple, android and windows platforms.  We have been looking a little bit into using react-native since the guys have experience with react.  I am wondering if anyone has some pointers or words of advice on how to build our existing react components to make the code more reusable for when we are using react native.  Any tips or tricks that others have learned that will make our life a lot easier down the road if we accounted for it now.  

Thanks in advance for whatever advice everyone has.

ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeffrey Dake

ASKER

Thanks for some information.  I was thinking we might have to write it differently, but was trying to see if anyone had any best practices to make sure everything is accounted for/works the same, or if it has to be written twice.
Hi,

You won't be able to reuse exact same code from ReactJS to React Native.
You can use responsive Boostrap with ReactJS and this will allows the user to use the web application with their mobile device.

If you really need an apps React Native will allow you to code once for Android & IOS.
This is where you can save time using React Native.

There is no real best practice for this scenario but if you already follow best practice in general you should have all the use case and other documentation of the actual version so this will save you time to create the apps.




Thanks,

If you were in my shoes would you think it would be better to have one frontend team who is responsible for the web application and the react-application, or do you they are different enough where you would need react-native specialists to make the app built out correctly?
Yes especially if you want to maintain both version.
Maybe someone from the frontend team would like to learn native apps so if you hire a senior react native dev he can teach some basic things and then later you will have backup.
This is also depending of the motivation about learning new things.