Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a <Snapshotable> to make it easier ? #48

Closed
gre opened this issue Mar 9, 2017 · 2 comments
Closed

Introduce a <Snapshotable> to make it easier ? #48

gre opened this issue Mar 9, 2017 · 2 comments
Assignees

Comments

@gre
Copy link
Owner

gre commented Mar 9, 2017

just the reason we (most of the time!) needs to do collapsable={false} on Android, and sometimes even needs to wrap a parent <View collapsable={false}> (e.g. WebView) makes me think maybe we should hide that from the lib user ( note https://github.com/gre/react-native-view-shot#specific-to-android-implementation ).

Maybe the library should (only?) be available through a wrapper Component.

<Snapshotable ref="snap"> ... </Snapshotable>

snap.capture().then(...

WDYT?

one downside is introducing a <View> wrapping changes the hierarchy.

@gre
Copy link
Owner Author

gre commented Aug 25, 2017

maybe the capture() method would also wait the View has received its first onLayout, that would simplify some usecases where you want to snapshot after the first ref cb settled

@gre gre self-assigned this Aug 25, 2017
@gre
Copy link
Owner Author

gre commented Aug 25, 2017

fixed in v2

@gre gre closed this as completed Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant