bug: incorrect react native code generation
Opened this issue · 3 comments
I am interested in helping provide a fix!
Yes
Which generators are impacted?
- All
- Angular
- HTML
- Preact
- Qwik
- React
- React-Native
- Solid
- Stencil
- Svelte
- Vue
- Web components
Reproduction case
Expected Behaviour
when i provide Tag in input i expected in react native output
Actual Behaviour
when i provide Tag in input i get in react native output
Additional Information
No response
I don't understand the bug. can you share the exact code that you expected and what you got instead?
I am sorry actually I tried giving it angle brackets like html tags but I think it is not possible... So I would restate the bug again.
Expected output is when I give Input component it maps to TextInput in react native. But the current behaviour is that Input is mapped to View component which is definately wrong
I see. Yes we currently only map to View
and Text
in React Native.
- To fix it, look here:
mitosis/packages/core/src/generators/react-native/index.ts
Lines 120 to 131 in 5b04b03
This is where you'll want to change the code, so it handles different HTML tags differently.
- You'll also want to add all the missing imports here: