Comments (7)
@szamanr Fixed in v3.1.3
from react.
Hey, thanks for the report, I’ll take a look into that. Which version are you using?
from react.
also got this after upgrading to 3.1.1. i believe this is the line causing issues: 77a2c9d#diff-637808297cc3779e9e013eb818247d1aa1ae9551ae4c2a8483e0560f3a4ef09aR9
probably needs something like if (typeof window !== "undefined") ...
from react.
Hey @pablocompagni-contractorvp @szamanr could you try [email protected]
and see if it solves that problem?
from react.
I can confirm it's working on 3.1.2-rc.1
from react.
Thanks @raskyer! I've published v3.1.2
with the fix and also added test to ensure it will be working in SSR context in the future
from react.
for me the app runs fine, but the event is not working. when i do a long press, i get a console error: Uncaught ReferenceError: global is not defined
.
my code:
const toggleDevModeWhenLongPressedThreeTimes = useLongPress(toggleDevMode, {
onCancel: switchBetweenDevModes,
});
PS. actually the error happens on any press, not just long press.
from react.
Related Issues (20)
- On Chrome for mobile, the click event triggers event if element was created after the pointerup event HOT 10
- Always sending last item context (v3) HOT 3
- Expand Codecov workflow action to cover all packages
- package.json should have the types property inside 'exports' field so that TS types can be correctly imported HOT 6
- Remove npm-publish library
- Separate build and test workflows
- Migrate react-interval-hook
- Add support for key long press HOT 1
- Migrate use-double-tap documentation to GitBook HOT 1
- Migrate react-interval-hook documentation to GitBook
- Add 'stateful' option to react-interval-hook HOT 1
- Move time param to options
- Add tests for case when trying to read position from unrecognised event HOT 1
- Refactor type names and structure
- Change default value of onFinish callback to undefined
- Add pause method to controls
- [QUESTION]How to avoid children triger onClick when longPress is trigger? HOT 2
- how to cancel a long press after it has started using custom logic? HOT 1
- useLongPress: Cancel when multiple touches occur HOT 2
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.