Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support React Native #158

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Support React Native #158

merged 1 commit into from
Sep 11, 2020

Conversation

sabaturgay
Copy link
Contributor

@sabaturgay sabaturgay commented Sep 9, 2020

I think the library is really nice. I want to use with react-native for mobile apps. To work with react-native, I added react-native primitives with files which are ending with .native.js . When react-native bundler is running, it will understand which file it should be used. Here is the things which I've changed in short:

  • Add View and Dimensions API to use instead of 'div', 'span', window
  • Change defaultProps.component with new primitives
  • Change style measurement strings with numbers (react-native does not support string px measurements ("10px"), it converts number values automatically. Also react automatically appends "px" for number values on web application. So it will work on both platform.)
  • Change window with Window ( I added just few functions which the library uses )

I hope you find it useful.

@gerbenmeyer
Copy link
Contributor

cool stuff!

@gerbenmeyer gerbenmeyer merged commit 0ce42e7 into sealninja:master Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants