Comments (3)
Hey @ziaulrehman40 , so what do you think ? is it working well ?
from react-native-responsive-ui.
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.
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)
- Update to React 16 HOT 4
- Strategy for sending base64 to the DB? HOT 1
- Suggestion: Modify ResponsiveStyleSheet to behave like Platform.select HOT 5
- orientation query not respected? HOT 1
- Can you use the library with vanilla JS i.e. without flow? HOT 3
- Typescript Support? HOT 1
- Push latest version to npm HOT 1
- Error for ResponsiveComponent in iOS and Android HOT 17
- MediaQuery dimensions? HOT 1
- When I use typescript to develop, always met error by calling useDemission. HOT 5
- TypeError: TypeError: (0, _reactNativeResponsiveUi.getStyleSheet) is not a function. HOT 3
- Can't use in non-typescript codebases, all files seems to be .tx only HOT 4
- Provide @types for Typescript HOT 7
- Warning: componentWillMount has been renamed, and is not recommended for use HOT 1
- No matching version found. Unable to install react-native-responsive-ui > 2.0.0 HOT 2
- Update releases tab HOT 1
- getStylesheet causes media query styles to leak into original stylesheet
- [Discussion] v3 API Changes
- removing lodash dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-responsive-ui.