Comments (7)
The @
symbol is called a decorator (check out this article for reference). Your environment may not implement them, especially since they're still part of a proposal that's subject to change. For now you can ignore the decorator shorthand like this:
import React, { Component } from 'react';
import { connectActionSheet } from '@expo/react-native-action-sheet';
class TheClassYouWantToConnect extends Component {
// ...
}
export default connectActionSheet(TheClassYouWantToConnect);
from react-native-action-sheet.
I've wrapped the <ActionSheetProvider>
in the top-level component but still no luck... same SyntaxError. Not sure what I'm doing wrong.
from react-native-action-sheet.
access actionSheet method as this.props.showActionSheetWithOptions and I received this err: 'undefined is not a function (near '...this.props.showActionSheetWithOptions...')"
from react-native-action-sheet.
I have this problem too.
from react-native-action-sheet.
Hi. I was wrapping my current
component/screen with <ActionSheetProvider />
and getting the same error.
Like is said in README It must be wrapped to the top-level
component.
I changed it to my top-level
component and it worked.
App.js:
export default class App extends React.Component {
render() {
return (
<ActionSheetProvider>
<TabBar />
</ActionSheetProvider>
)
}
}
from react-native-action-sheet.
Thanks @mitchellbutler. Closing this
from react-native-action-sheet.
Shouldn't be closed or at least should be in the documentations. Literally every new react installation gets the same error about decorators.
from react-native-action-sheet.
Related Issues (20)
- Styling cancel button HOT 1
- Not compatible with Gradle 7 HOT 2
- [Android] change color of cancel button HOT 1
- callback not refreshing after calling it first time. HOT 1
- sheet not show in 'fullscreenmodal' stack HOT 2
- Two bugs with the new version 4.0.0 HOT 4
- Jest : Cannot read properties of undefined (reading 'SelectableBackground') HOT 3
- Support for automated tests HOT 3
- Allowing to await the callback result and return a result HOT 2
- Best way to get the height of the Action Sheet? HOT 2
- useModal not working on iOS with useCustomActionSheet="true" HOT 1
- [Android] Action sheet text gets cut-off HOT 1
- [Android] Action sheet text gets cut-off HOT 4
- ERROR TypeError: Cannot read property 'length' of undefined HOT 4
- [Android] Screen reader treats title as a selectable option
- [Feature] It would be great, if we could change the background of buttons HOT 2
- Feat: Support new iOS dismissActionSheet() static method
- [web] expo sdk >47 setNativeProps fix HOT 3
- [Android] Last option unavailable when windowTranslucentNavigation = true HOT 2
- I put the images into this repo, as that appears to be the pattern used now.
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-action-sheet.