February 2019
Beginner to intermediate
180 pages
4h 4m
English
For now, we'll use a hardcoded array of customers. Soon, we'll retrieve this data from localStorage. The following component renders a styled array of customers. Each customer is wrapped in a <Link /> component. Clicking on a customer navigates to the update view:
let component = ReasonReact.statelessComponent("CustomerList");let customers: array(CustomerType.t) = [ { id: 1, name: "Christina Langworth", address: { street: "81 Casey Stravenue", city: "Beattyview", state: "TX", zip: "57918", }, phone: "877-549-1362", email: "Christina.Langworth@gmail.com", }, ...];module Styles = { open Css; let list = style([ ... ]);};let make = _children => { ...component, render: _self => <div> <ul className=Styles.list> { ReasonReact.array( ...Read now
Unlock full access