Skip to content

Guides need to show importing #2604

Closed
@gaearon

Description

@gaearon

Description

I'm reading https://docs.swmansion.com/react-native-gesture-handler/docs/quickstart/ and it's frustrating that there are no import statements. So I need to guess where to get GestureDetector, Animated.View, useSharedValue, Gesture, etc, from. This is particularly thorny because these example "span" two different libraries — also it's very easy to get confused about which Animated is being talked about.

I suggest adding clear import sections to https://docs.swmansion.com/react-native-gesture-handler/docs/quickstart/ and other guides. Ideally examples always need to be ready to be copy pasted.

Thanks!

Steps to reproduce

Open docs

Snack or a link to a repository

irrelevant

Gesture Handler version

irrelevant

React Native version

irrelevant

Platforms

Android, iOS, Web

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Labels

DocumentationDocumentation change/enhancement will likely prevent people from encountering this problem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions