GithubHelp home page GithubHelp logo

dannyhw / expo-template-storybook Goto Github PK

View Code? Open in Web Editor NEW
29.0 2.0 7.0 2.36 MB

An expo template for react native storybook

Home Page: https://www.npmjs.com/package/expo-template-storybook

TypeScript 76.30% JavaScript 23.70%
expo react-native-web storybook template

expo-template-storybook's Introduction

image

getting started

npx create-expo-app --template expo-template-storybook AwesomeStorybook

or

yarn create expo-app --template expo-template-storybook AwesomeStorybook

app

yarn start

Ondevice

In this template you can now run yarn storybook to start ondevice storybook or yarn start to start your expo app. This works via env variables and expo constants.

# either
yarn storybook

# ios
yarn storybook:ios

# android
yarn storybook:android

If you add new stories on the native (ondevice version) you either need to have the watcher running or run the stories loader

To update the stories one time

yarn storybook-generate

Web

Start react native web storybook:

yarn storybook:web

build react native web storybook:

yarn build-storybook

expo-template-storybook's People

Contributors

dannyhw avatar flexbox avatar mauro-codes avatar

Stargazers

Nick Imanzi avatar Federico Hernández avatar  avatar Daniel David Sintimbrean avatar Gerardo Cordero avatar J. Gilberto C. Santaella avatar Dan avatar Christopher Fields avatar  avatar Derek Lucas avatar  avatar Anthony Williams avatar Aaron Nuñez avatar Roman avatar Eric Kreutzer avatar  avatar Luana avatar Drew avatar jacksuite avatar Miguel Niblock avatar Tsiry Sandratraina avatar  avatar Harry avatar Alon E avatar Blockchain Pan avatar juandav avatar Matthew Shooks avatar Pavlos Vinieratos avatar Adam Hari avatar

Watchers

 avatar Rubén Juan Molina avatar

expo-template-storybook's Issues

Storybook 7 crash yarn start

Hey @dannyhw , this is an awesome project, just what I needed to get started with Storybook for my expo app.

After installing the template all the functions work fine.

When you run yarn storybook:web the terminal tells you that "Storybook 6.5.16 for React started" and "A new version (7.4.6) is available!" Upgrade now: npx storybook@latest upgrade

After the upgrade I run yarn start and try to open the app on a device I get this error.

Android Bundling failed 627ms
Unable to resolve "@storybook/react/dist/modern/client/docs/extractArgTypes" from ".ondevice/doctools.js"

How is this supposed to be used?

Hi,

I have been struggling with using storybook in my React Native project. This template is the one that currently works the best. However, I am wondering how I am supposed to use the components that I develop both in my app and in my storybook?

Currently, I have set up a normal Expo app, with a subfolder where this template exists. Then I have made aliases in my app to get the components from storybook/components. Then, my problem becomes that there exists two copies of react in my app. One in node_modules/react and one in storybook/node_modules/react.

If you could please help guide me in the right direction of how I am supposed to use the components that I develop in a storybook in my actual app I would be very very grateful.

Thank you.

Running alongside an existing expo app

Hey @dannyhw , this is an awesome project. I'm new to storybook and was trying to use it alongside my existing expo app, for UI development. But after taking a closer look at your project, I'm confused as to how storybook should be used. It seems like this is intended to use storybook as the main app in App.tsx. Is this the only way it can be set up with expo? I would like to still be able to run my regular app, and run storybook on the side. If that's not possible, would you have to create a monorepo? I.e. installing your template as a subproject? I would highly prefer to not go that route because monorepos are harder to maintain. How would you normally set this up if you were developing an actual app, (Not a UI library), and only wanted to use storybook to test the UI that goes into the app? Thanks and I hope to help document anything that might help storybook adoption in expo! It's an awesome tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.