react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

[feature-request] Support web

Open NiciusB opened this issue 5 years ago • 8 comments

Currently, it seems like react-native-view-shot just returns undefined when ran in a web browser with react-native-web

I understand why this happens, but it might be interesting to wrap a library like html2canvas to provide at least some basic functionality

I will happily send a pull request if @gre thinks that it's within the scope of the package

NiciusB avatar Jun 26 '19 15:06 NiciusB

it can happens yeah 😍

gre avatar Jun 26 '19 15:06 gre

Hi, did you add support for Web ?

dario30186 avatar Oct 27 '20 10:10 dario30186

Hi @dario30186. The merge request is still open, so react-native-view-shotdoes not have web support.

You could use my fork: react-native-view-shot-with-web-support on npm (https://github.com/NiciusB/react-native-view-shot). I have to warn, it will not be perfect. It uses html2canvas which has some drawbacks, more notably the text kerning can be pretty weird.

NiciusB avatar Oct 27 '20 18:10 NiciusB

Hello, when will this feature be merged? @gre @NiciusB

likeSo avatar Aug 31 '21 09:08 likeSo

@gre please respond

ShivamJoker avatar Dec 07 '21 05:12 ShivamJoker

You could use my fork: react-native-view-shot-with-web-support on npm (https://github.com/NiciusB/react-native-view-shot). I have to warn, it will not be perfect. It uses html2canvas which has some drawbacks, more notably the text kerning can be pretty weird.

@NiciusB this is awesome. Works perfectly for me. Thanks for saving a ton of hours. 😍

dackom avatar Jan 19 '22 10:01 dackom

Is this PR merged ?

anurag55555 avatar Mar 09 '22 07:03 anurag55555

sorry for missing out all my notifications 😢 The PR can't be merged because it conflicts with upstream. Please reopen one that can be merged 🙏

gre avatar May 27 '22 10:05 gre

I'm going to continue the work of @NiciusB in this PR 🚀

chrispader avatar Jun 06 '23 11:06 chrispader

@gre could you please also push a new version on NPM. :) That would be great. Thanks for merging this so soon 🥳

chrispader avatar Jun 19 '23 10:06 chrispader

Nice! Great job @chrispader 🤘

NiciusB avatar Jun 19 '23 12:06 NiciusB

@NiciusB thanks to you, you did most of the work already haha 😉

chrispader avatar Jun 19 '23 12:06 chrispader