We have a developed react native
project using JavaScript
, now we decided to have it's website too. We found out that Microsoft
introduced ReactXP
and it is able to release website too. is it possible to convert current react native project to reactXP?
Asked
Active
Viewed 400 times
1

Alireza Akbari
- 2,153
- 2
- 28
- 53
1 Answers
1
Yes, it's possible. You'll need to replace tags like <View/>
with <RX.View/>
, <Text/>
with <RX.Text/>
, etc. Then, when compiling for the browser or native, ReactXP will internally exchange <RX.View/>
etc. with the appropriate tag automatically depending on your current target (<div/>
for the browser and <View/>
for native).
But you don't have to exchange all tags with their <RX.*
counterparts right away. Meaning you can still use a few <div/>
etc. for the browser target and <View/>
etc. for the native target. However, if you really only want one codebase and then cross-compile to any target, then you need to replace them all.
Styling is a bit different too: ReactXP doesn't have percentage values for width, height, etc.