Code Monkey home page Code Monkey logo

storybooktest's Introduction

Storybook Test

Preface

The welcoming text of the app is meant to instill that all too common feeling of uneasy relief that I have when developing: 'At least I got to this point'.

Introduction

Project to see React Native and Storybook and TypeScript can play nice together.

Followed this tutorial:

https://pusher.com/tutorials/storybook-react-native

Plus added the Typescript and navigation with a lot of googling.

Goal

React native app that is integrated with Storybook UI that is navigable from the app. The idea is that as a developer one could navigate to the StoryBook, but also dive into the app simultaneously. Admittedly, this is mostly a fear born out of unfamiliarity with Storybook.

Prerequisites

Tool Version
yarn 1.13.0
npm 6.1.0
node 10.3.0
react-native-cli 2.0.1

How to

Run

Open iOS simulator or Android emulator or have device connected to computer and then:

yarn install
yarn <android|ios> # choose one

NB With this version of React Native and XCode 10.2.1, iOS simulator has to be run from XCode itself.

Test

yarn test

If trying to run from Jetbrains IDE, make sure to use Jest run configuration and not npm/node.

Possible weirdness

  1. I introduced TypeScript after starting with this project, so followed migration to TypeScript rather than starting project afresh.
  2. Accidentally using library react-native-navigation instead of more common react-navigation. Got some wires crossed, but decided to keep it. Although the iOS code had to look exactly as in their installation manual with which I'm not overly happy.
  3. May have added some unnecessary libraries as I tried to solve an issue that had nothing to do with the project code, but more with me incorrectly downloading the jpg-files.

Conclusion

They can

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.