fwouts / viteshot

Viteshot 📸 is a fast and simple component screenshot tool based on Vite.

Home Page:https://viteshot.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: React Native Support

kylerjensen opened this issue · comments

We've been trying out Viteshot for our design system / component library which we've built in React Native. We are able to Viteshot working using react-native-web, but we realize that this isn't a true native or cross-platform approach and we occasionally encounter scenarios where there are differences between the screenshots we capture with Viteshot and the components that are actually rendered in production. I'd be very excited to see Viteshot become capable of taking screenshots of components on an iOS simulator or Android emulator.

Here's how I might expect this to work:

  • Viteshot creates a blank react-native project using the Expo CLI
  • Viteshot simultaneously launches the react-native project in an iOS simulator and an Android emulator using the Expo CLI
  • For each screenshot component, Viteshot renders the component in the Expo application and takes a screenshot with a shooter appropriate for the platform
  • Viteshot terminates the running Expo server
  • Viteshot closes the opened simulator and emulator windows (optional)

Obviously there would be a lot of experimentation needed to make this happen, but having React Native support in this tool would be really incredible for my team!

Thanks @kylerjensen for sharing the idea!

I think this probably would make more sense as a completely new project, mostly based on the fact that this would be a very different codebase and wouldn't use Vite at all 😂

It sounds like a great project, although not something that I'd use myself so it wouldn't make sense to allocate my (very limited) free time for it. I'd encourage you to take it on!

Also happy to discuss with your company doing this as a paid project (get in touch at f@zenc.io).

Thanks @fwouts for the quick reply and for your continued work on Viteshot!

I agree that this feature request does not fit well with Viteshot's original mission and vision. A new project or fork is probably the best place for this kind of addition to live. I'll go ahead and close this issue for now.

Best regards!