Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Does it works with React Native? #14

Open
sospedra opened this issue Jan 5, 2017 · 6 comments
Open

Does it works with React Native? #14

sospedra opened this issue Jan 5, 2017 · 6 comments

Comments

@sospedra
Copy link

sospedra commented Jan 5, 2017

I doesn't like :/

@danielberndt
Copy link
Collaborator

I actually haven't tried it with react native yet. But I'm fairly optimistic that this library could work quite well in this use case since there's no dependency on ReactDOM and no html tags are being used. Except of course for the <form> tag. Any ideas or suggestions how forms are treated in React Native?

Also: have you tried embedding it in a react native library? What kind of errors did you get?

@wangzuo
Copy link
Contributor

wangzuo commented Jan 12, 2017

I have made some small tweaks of reform to make it work on react-native. Maybe we can come up with sth like react-reform-native, really like the idea of themes.

@danielberndt
Copy link
Collaborator

Very cool! Can you share a gist or something like that so I can see what changes you've made to make it work?

Definitely awesome stuff! 👍
And I absolutely can imagine supporting react native in some shape or form :)

@wangzuo
Copy link
Contributor

wangzuo commented Jan 12, 2017

Sure https://gist.github.com/wangzuo/91e997a118a3d5e632823eddb5655948

@danielberndt
Copy link
Collaborator

Ah great! That's indeed very few necessary changes! Maybe it's not even necessary to create a separate react-reform-native library. Maybe it's enough to use the <ReformContext> which allows to pass a formContainerComponent prop. (it's "form" by default).
And for react-native projects you simply use

<ReformContext formContainerComponent={View}/>

@wangzuo
Copy link
Contributor

wangzuo commented Jan 13, 2017

Yes, but there is also no event system on react native

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants