evanbacon / react-native-web-hooks Goto Github PK
View Code? Open in Web Editor NEWHooks for React Native web and Expo
License: MIT License
Hooks for React Native web and Expo
License: MIT License
@EvanBacon for lack of a better place. I am currently using this in leading an effort to implement a component library across react native Web, iOS, Android that has heavy testing requirements. How would you go about testing hover states of buttons. Would you use react testing library with react native web, or would there be a way to use react native testing library?
With Ctrl+Scroll or + or -, we can change the page zoom, or pinching on mobile.
Is there someway to get the current user zoom?
Here's the Weekly Digest for EvanBacon/react-native-web-hooks:
Last week 1 issue was created.
It is still open.
๐ #11 Hoverable does not work with react-native-web 12.0, by jsp3536
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were 4 stagazers.
โญ majidux
โญ LeoLeBras
โญ artyorsh
โญ comontes
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository EvanBacon/react-native-web-hooks to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
Still trying to build https://github.com/expo/examples/tree/master/with-gatsby in production mode, with real SSR.
It's almost there, but this library does not support SSR:
Not sure exactly how this can be fixed. Can we compute the output of useREM on SSR?
getComputedStyle(document.documentElement).fontSize
can't work on the frontend. One possibility could be to add a default fallback value for SSR, and allow to override that value through context on the server? Like <RNWHProvider value={{documentFontSize: 16}}/>
?
Another option would be to provide a default fallback value as 2nd arg, like useREM(1.3, 16);
BTW, is useREM really a hook? it does not use any primitive React hook so it's just a function call (that currently only works in the browser)
Thanks for the great library which lets me replace my custom hooks now. Do you have any current plans for migrating to Typescript or adding types?
Hoverable does not work with react-native-web 12.0. If I downgrade to 11.7 everything works again
As far as I can tell, the default use case of useHover is making the hovered item semi-transparent.
Is there a way to override this?
I am creating a drowndown menu component, and I do not want any transparency when a user hovers over a dropdown menu item
Scenario:
Sliding expandable sidebar with a toggle button
Behavior:
Expected:
3. Background color returns to default non-hovered display
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch [email protected]
for the project I'm working on.
This resolved a warning about getNode being deprecated in the future.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-web-hooks/build/createPseudoHook.js b/node_modules/react-native-web-hooks/build/createPseudoHook.js
index 2c544fb..002cda5 100644
--- a/node_modules/react-native-web-hooks/build/createPseudoHook.js
+++ b/node_modules/react-native-web-hooks/build/createPseudoHook.js
@@ -11,7 +11,7 @@ export default function createPseudoHook({ events }) {
const [isActive, setActive] = React.useState(false);
React.useEffect(() => {
const [eventIn, eventOut] = events;
- const node = getNode(ref);
+ const node = ref.current;
if (!node) {
return;
}
This issue body was partially generated by patch-package.
Hi @EvanBacon
I wonder how you solve this:
fontSize must be a number according to RN typedefs, yet useREM might return a string on web and is string | number
Here's the Weekly Digest for EvanBacon/react-native-web-hooks:
Last week 1 issue was created.
It is still open.
๐ #9 Types issue for useREM, by slorber
Last week, no pull requests were created, updated or merged.
Last week there were no commits.
Last week there were no contributors.
Last week there were 4 stagazers.
โญ byCedric
โญ majidux
โญ LeoLeBras
โญ artyorsh
You all are the stars! ๐
Last week there were no releases.
That's all for last week, please ๐ Watch and โญ Star the repository EvanBacon/react-native-web-hooks to receive next weekly updates. ๐
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.