Giter VIP home page Giter VIP logo

Comments (3)

Lucas-Geitner avatar Lucas-Geitner commented on August 26, 2024

Hey @ziaulrehman40 , so what do you think ? is it working well ?

from react-native-responsive-ui.

nabilfreeman avatar nabilfreeman commented on August 26, 2024

Hey folks, yes it does work 100% in react-native-web. We just got it working today.

You need to jump through a couple of hoops though - first you either need to compile the TypeScript files down to JS or use this fork: https://github.com/ziaulrehman40/react-native-responsive-ui

Then if you want to import like import { getStylesheet } from 'react-native-responsive-ui you have to patch-package to hijack the correct index.js file. Here's the contents of the patch.

react-native-responsive-ui+2.1.1.patch

diff --git a/node_modules/react-native-responsive-ui/dist/src/index.js b/node_modules/react-native-responsive-ui/dist/src/index.js
new file mode 100644
index 0000000..6799cf8
--- /dev/null
+++ b/node_modules/react-native-responsive-ui/dist/src/index.js
@@ -0,0 +1,7 @@
+import Index from '../module/index.js';
+
+// export constants
+export * from '../module/index.js'
+
+// export default
+export default Index
\ No newline at end of file

p.s. this patch only works for ziaulrehman40's fork which we are using.

from react-native-responsive-ui.

crutchcorn avatar crutchcorn commented on August 26, 2024

Hey y'all, new maintainer of the project here 👋

First: @nabilfreeman this issue should be fixed as-of 2.1.2. You shouldn't have to do this patch anymore as #80 is merged

Second: We just updated our scaffolding of the project to include an example project. This project will be using react-native-web and will likely be a new homepage for the project to demo it's usage. I'll be working on integration tests first, but then work on getting the example webpage built and deployed

I'll make sure to update the README to mention support of react-native-web support and link to the example for future documentation efforts

from react-native-responsive-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.