Comments (29)
Maybe you guys could release this to npm? We're having to point to the develop branch because the npm version is broken and I don't think it's going to work for anyone.
from react-native-hold-menu.
As @booyeu pointed out the solution, that works because object spread is not supported in worklets, its a known problem, as mentioned in the reanimated docs here https://docs.swmansion.com/react-native-reanimated/docs/next/#known-problems-and-limitations
from react-native-hold-menu.
Could you please share other details in bug issue template for your example?
HoldMenuProvide
is should be used in root of your app (App.js) by the way. And what kind a usage are you trying? If you want to use touchable or pressable with HoldMenu you can check this usage.
from react-native-hold-menu.
Screens tsx
import { Box, StyledText } from 'components';
import * as React from 'react';
import { useNavigation } from '@react-navigation/native';
import { useDispatch } from 'react-redux';
import I18n from 'lang/languages';
import { ListInterface } from 'store/types';
import { Pressable } from 'react-native';
import { HoldItem } from 'react-native-hold-menu';
interface Props {
item: ListInterface;
isFirstElement?: boolean;
isLastElement?: boolean;
onPress?: () => void;
}
export const MeListItem = (props: Props) => {
const MenuItems = [
{ text: 'Actions', isTitle: true, onPress: () => {} },
{ text: 'Action 1', onPress: () => {} },
{ text: 'Action 2', withSeperator: true, onPress: () => {} },
{ text: 'Action 3', isDestructive: true, onPress: () => {} },
];
return (
<Box>
<HoldItem items={MenuItems}>
<Pressable onPress={() => console.log('test')}>
<StyledText fontSize={25}>{props.item.emoji}</StyledText>
</Pressable>
</HoldItem>
</Box>
);
};
app.tsx
<HoldMenuProvider theme="light">
<Navigator />
</HoldMenuProvider>
from react-native-hold-menu.
Are we going to go one by one? Which versions are you using?
from react-native-hold-menu.
Are we going to go one by one? Which versions are you using?
oo sorry :(
Package versions
React: 17.0.1
React Native: 0.64.0-rc.4
React Native Reanimated: 2.0.0
from react-native-hold-menu.
And the Hold Menu version? Is it v0.0.8? This might because of your Reanimated setup as well. Be sure Reanimated it is working fine.
from react-native-hold-menu.
And the Hold Menu version? Is it v0.0.8? This might because of your Reanimated setup as well. Be sure Reanimated it is working fine.
yes, v0.0.8, Reanimated I've been using it for a long time, but let me check again.
from react-native-hold-menu.
I see, I have to reproduce problem to solve and will try. Any help would be great to reproduce it.
from react-native-hold-menu.
I see, I have to reproduce problem to solve and will try. Any help would be great to reproduce it.
Reanimated no problem, add react-native-hold-menu some problem
https://user-images.githubusercontent.com/38668796/110529174-f8a2e780-8129-11eb-90ca-b65ca7e33ea5.mov
from react-native-hold-menu.
https://github.com/software-mansion/react-native-reanimated/releases/tag/2.0.0
Can it test this with the stable version just released? I wonder if the library does not work steadily
from react-native-hold-menu.
I have not tested with stable version yet but was working with rc-3 that last version before the stable. No breaking changes after rc-3 (maybe this). Will try it today with 2.0.0.
from react-native-hold-menu.
@enesozturk Can it run ? I have the same error. I use react-native init to create a project and follow react-native-unimodules installing. Do I need try create-react-native-app to create a project ?
from react-native-hold-menu.
Hi @booyeu, I am trying to fix another more important issue for now, after that this must be solved with new release. It is important which React Native and Reanimated version you are using. You can check the expo project or clone this repo and run the example project.
from react-native-hold-menu.
@enesozturk thank you very much ^^ . And I want to know dose it also need expo in the new release ? My app will be bigger when I choice add react-native-unimodules to enable expo function
from react-native-hold-menu.
@enesozturk thank you very much ^^ . And I want to know dose it also need expo in the new release ? My app will be bigger when I choice add react-native-unimodules to enable expo function
You don't have to use Expo. You can use bare RN setup with unimodules. It is needed for blurview and haptic feedback. We may make it optional further releases.
from react-native-hold-menu.
@enesozturk ok ok , thank you . I really really like this project and appreciate . And want to know maybe when it can use in [email protected] and [email protected] stable version ?
from react-native-hold-menu.
@enesozturk ok ok , thank you . I really really like this project and appreciate . And want to know maybe when it can use in [email protected] and [email protected] stable version ?
Not sure. Thanks for let me know the versions. I will check it 👍🏽
from react-native-hold-menu.
I fix the problem by set _leftOrRight from object to value, and edit "..._leftOrRight" to "left:_leftOrRight"
but now , I found items onPress error . Maybe also because of react-native-reanimated stable version?
from react-native-hold-menu.
There must be something missing. _leftOrRight is returning an object
are you sure? And what if it is opening from right? Yes there is an issue I am following it. software-mansion/react-native-reanimated#1758
Reanimated team also worked on int an releases in v2.0.1
but still exist -> software-mansion/react-native-reanimated#1844
from react-native-hold-menu.
I see the object _leftOrRight just has one param . So I change _leftOrRight to number, and edit it like "left:_leftOrRight". Then it can run and shows ok. Do you have error when click the item . I give an onPress param , But it shows like this
from react-native-hold-menu.
and it seems your doc write a wrong props . holditems your doc shows styles , but it is containerStyles in codes~~
from react-native-hold-menu.
and it seems your doc write a wrong props . holditems your doc shows styles , but it is containerStyles in codes~~
Oh I see, will fix it 👍🏽
from react-native-hold-menu.
and item text prop doesn't support Chinese like " 你好". It shows error code.I review the code the whole day. But I don't know why...Do you have any idea ? Thank you very much !!!!
from react-native-hold-menu.
That is weird. No idea why. Maybe it is related the same issue. Text is passing through Shared Value. That might breake something.
from react-native-hold-menu.
I am experiencing this exact same error, any fix for it yet?
from react-native-hold-menu.
For anyone encountering this issue, the simplest thing I found is to fork the repo, build the develop branch, remove lib from the .gitignore and commit it, then point to your fork in the package.json
from react-native-hold-menu.
Having the exact same issue here too.
Using react-native: 0.65.1
And last version of this package
from react-native-hold-menu.
For anyone encountering this issue, the simplest thing I found is to fork the repo, build the develop branch, remove lib from the .gitignore and commit it, then point to your fork in the package.json
Not working for me
from react-native-hold-menu.
Related Issues (20)
- With `Expo-router`, `HoldItem` clicked moves the height of the header HOT 2
- `undefined is not a function` HOT 1
- If menu items do not have unique names keys are not updating HOT 3
- Exposes a `key` value for `MenuItemProps` menu items that are identical other than their `onPress` function are approriately re-rendered HOT 2
- Expo 49 - Breaking Changes HOT 18
- item.onPress.apply is not a function HOT 1
- HoldItem causing entire component to re-render HOT 7
- Bottom item is too short HOT 1
- Menu displays behind modal screen HOT 1
- Expo Managed app support HOT 1
- `HoldItem` react context is incorrect HOT 2
- Position of element doesn't take header and other content into account HOT 1
- Doesn't expire cached items prop with arrow functions HOT 6
- v0.1.5 has many differences with main branch HOT 4
- It doesn't work combined with react-navigation on expo managed projects :(
- HoldMenuProvider crashes expo on reload HOT 3
- Padding Bug HOT 3
- Clashing dependencies
- Is project still maintained ? HOT 5
- v0.1.6 is not available on npmjs HOT 1
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-hold-menu.