December 2018
Intermediate to advanced
642 pages
15h 5m
English
Let's write some stories. We can start with the <RegionsTable> component, which is quite simple: it doesn't include any actions, and just displays data. We can write two cases: when an empty list of regions is provided, and when a non-empty one is given. We don't have to think too much about the needed fake data, because we can reuse what we wrote for our unit tests! Consider the following code:
// Source file: src/regionsStyledApp/regionsTable.story.js/* @flow */import React from "react";import { storiesOf } from "@storybook/react-native";import { Centered } from "../../storybook/centered";import { RegionsTable } from "./regionsTable.component";const fakeDeviceData = { isTablet: false, isPortrait: true, height: 1000, width: ...Read now
Unlock full access