SlideShare a Scribd company logo
1 of 29
Download to read offline
How to build and document
systems in a reactish way
Why Finland?
Science.
ZURB Foundation
Top Contributor, Certified Preferred, etc.
Agenda
‣ React Ecosystem and Design Systems
‣ Explore each: Storybook, Styleguidist, and Styled Components
‣ Links to github starter repos where you can try it out quickly
‣ Questions and Discussion
The React Ecosystem
‣ Focus on JavaScript Ways of Working
‣ Webpack (usually)
‣ CRA (or similar to ejected tooling)
The React Ecosystem part 2
‣ Movement towards Typescript (fingers crossed)
‣ Granular self-contained isolated components
‣ Redux store / state kind of becoming standard
‣ CSS kind of sucks... more on that later
The Desgin System Ecosystem
aka UI Component Library
‣ Component Builders
‣ Living (Coded) Styleguides
Workshop vs. Storefront – Brad Frost
source: Storybook vs Styleguidist, Chroma further reading: The Workshop and the Storefront, Brad Frost
Backend (the workshop) vs. Frontend (the storefront)
‣ What is useful to devs + designers
‣ How can we share beyond the team in the organization
‣ What is a good breakpoint for the overlap
Storybook - the workshop
‣ You write stories in JavaScript files that are decoupled
‣ All about how you describe components
‣ Great for visual edge cases, both for testing and exposing to design
source: React Styleguidist Cookbook
STORYBOOK EXAMPLE
import React from "react";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";
import Button from "../components/Button";
storiesOf("Button", module).add("default", () => (
<Button onClick={action("clicked")}>Push Me</Button>
));
Container Component Model FTW
‣ Great for testing the components across many variations
‣ Mock click handlers with @storybook/addon-actions
‣ Stub in data in situ with @storybook/addon-knobs
‣ A bunch of other stuff (regression testing, notes, etc.)
style guide as the happy home where all that design system stuff lives
–Brad Frost (emphasis mine)
source: The Workshop and the Storefront, Brad Frost
Styleguidist - the storefront
‣ Auto public method docs
‣ All components on a single page (Styleguide)
‣ Extra docs added (Design System or More complete docs)
‣ Can be branded (customizable design) (also possible in storybook v5)
‣ You get some docs auto generated
REACT STYLEGUIDIST EXAMPLE (FENCES REMOVED)
<Button onClick={() => console.log('clicked')>Push Me</Button>
What about CSS?
‣ In react it kind of sucks
‣ Styles, but no :hover and similar states making it useless alone
‣ Import css via webpack, what is this 1996
‣ Sass or some sort of other extra build pipeline or webpack config
‣ CSS in JS - this has really matured in the last year
Styled Components
‣ It sounds complicated but it can be really simple
‣ Allows you to easily port existing CSS based projects
‣ Themeable architecture to develop larger scaled applications
‣ Predictable and fast
‣ Highly configurable
Styled Components Example - App.tsx
import styled, { createGlobalStyle, keyframes } from "styled-components";
import styledNormalize from "styled-normalize";
...
class App extends React.Component { render() { return (
<AppWrapper>
<GlobalStyle />
<Header>
...
</Header>
</AppWrapper>
); } }
GlobalStyle
const GlobalStyle = createGlobalStyle`
${styledNormalize}
body {
font-family: -apple-system, ...
...
}
code {
font-family: source-code-pro, ...
}
`
Animation Example
const Rotate = keyframes`
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
`
const Logo = styled.img`
animation: ${Rotate} infinite 20s linear;
height: 40vmin;
`
Header Example
const Header = styled.header`
background-color: #282c34;
min-height: 100vh;
...
`;
You can add attributes, props and use javascript to do anything
progromatic
Some thoughts about CSS in JS
‣ Think in terms of state rather than css class names
‣ Keep things developer friendly and easy to read
‣ Allow deeper digging through imports as complexity rises
workshop tools storefront product
storybook styled components styleguidist your app
Try it out quickly
github.com/jamesstoneco/react-styleguidist-todo
(React Styleguidist)
github.com/jamesstoneco/foldable
(CRA, Typescript, Storybook, Styleguidist, CypressIO)
React Finland - April 2019
‣ Maybe of interest if you want to learn more about design systems
with react
‣ Design Systems Workshop by the creator of React Styleguidist
Turku loves-storybook-styleguidist-styled-components

More Related Content

What's hot

Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Alvaro Sanchez-Mariscal
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJSTu Hoang
 
Why you should add React to your Rails application now!
Why you should add React to your Rails application now!Why you should add React to your Rails application now!
Why you should add React to your Rails application now!David Roberts
 
Creating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityCreating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityAlvaro Sanchez-Mariscal
 
Building user interface with react
Building user interface with reactBuilding user interface with react
Building user interface with reactAmit Thakkar
 
Visual Studio Productivity tips
Visual Studio Productivity tipsVisual Studio Productivity tips
Visual Studio Productivity tipsAlex Thissen
 
JHipster, modern web application development made easy
JHipster, modern web application development made easyJHipster, modern web application development made easy
JHipster, modern web application development made easyRaphaël Brugier
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesKeith Fitzgerald
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...NCCOMMS
 
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Alvaro Sanchez-Mariscal
 
Grails Connecting to MySQL
Grails Connecting to MySQLGrails Connecting to MySQL
Grails Connecting to MySQLashishkirpan
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_jsMicroPyramid .
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React NativeStanfy
 
AWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSAWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSRiza Fahmi
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.jsMax Klymyshyn
 

What's hot (20)

Stripe con 2021 UI stack
Stripe con 2021 UI stackStripe con 2021 UI stack
Stripe con 2021 UI stack
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Why you should add React to your Rails application now!
Why you should add React to your Rails application now!Why you should add React to your Rails application now!
Why you should add React to your Rails application now!
 
Creating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring SecurityCreating applications with Grails, Angular JS and Spring Security
Creating applications with Grails, Angular JS and Spring Security
 
Building user interface with react
Building user interface with reactBuilding user interface with react
Building user interface with react
 
Visual Studio Productivity tips
Visual Studio Productivity tipsVisual Studio Productivity tips
Visual Studio Productivity tips
 
JHipster, modern web application development made easy
JHipster, modern web application development made easyJHipster, modern web application development made easy
JHipster, modern web application development made easy
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
Introduction To Grails
Introduction To GrailsIntroduction To Grails
Introduction To Grails
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
 
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
 
Grails Connecting to MySQL
Grails Connecting to MySQLGrails Connecting to MySQL
Grails Connecting to MySQL
 
What is new in ASP.NET Core
What is new in ASP.NET CoreWhat is new in ASP.NET Core
What is new in ASP.NET Core
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React Native
 
AWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJSAWS Lambda with ClaudiaJS
AWS Lambda with ClaudiaJS
 
React vs-angular-mobile
React vs-angular-mobileReact vs-angular-mobile
React vs-angular-mobile
 
Oracle jet
Oracle jetOracle jet
Oracle jet
 
Robust web apps with React.js
Robust web apps with React.jsRobust web apps with React.js
Robust web apps with React.js
 

Similar to Turku loves-storybook-styleguidist-styled-components

Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedGil Fink
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Anupam Ranku
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB
 
The ABC of Coded Style Guides
The ABC of Coded Style GuidesThe ABC of Coded Style Guides
The ABC of Coded Style GuidesHenning Muszynski
 
MongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsMike Wilcox
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17GreeceJS
 
Improving your responsive workflow with style guides
Improving your responsive workflow with style guidesImproving your responsive workflow with style guides
Improving your responsive workflow with style guidesLuke Brooker
 
From Back to Front: Rails To React Family
From Back to Front: Rails To React FamilyFrom Back to Front: Rails To React Family
From Back to Front: Rails To React FamilyKhor SoonHin
 
Henning Muszynski - The ABC of Coded Style Guides
Henning Muszynski - The ABC of Coded Style GuidesHenning Muszynski - The ABC of Coded Style Guides
Henning Muszynski - The ABC of Coded Style GuidesOdessaJS Conf
 
Why your build matters
Why your build mattersWhy your build matters
Why your build mattersPeter Ledbrook
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試Simon Su
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkBob German
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedGil Fink
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 

Similar to Turku loves-storybook-styleguidist-styled-components (20)

Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch TutorialMongoDB.local Seattle 2019: MongoDB Stitch Tutorial
MongoDB.local Seattle 2019: MongoDB Stitch Tutorial
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
 
Atomic design
Atomic designAtomic design
Atomic design
 
The ABC of Coded Style Guides
The ABC of Coded Style GuidesThe ABC of Coded Style Guides
The ABC of Coded Style Guides
 
MongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch TutorialMongoDB.local Atlanta: MongoDB Stitch Tutorial
MongoDB.local Atlanta: MongoDB Stitch Tutorial
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatterns
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 
Improving your responsive workflow with style guides
Improving your responsive workflow with style guidesImproving your responsive workflow with style guides
Improving your responsive workflow with style guides
 
From Back to Front: Rails To React Family
From Back to Front: Rails To React FamilyFrom Back to Front: Rails To React Family
From Back to Front: Rails To React Family
 
Henning Muszynski - The ABC of Coded Style Guides
Henning Muszynski - The ABC of Coded Style GuidesHenning Muszynski - The ABC of Coded Style Guides
Henning Muszynski - The ABC of Coded Style Guides
 
Why your build matters
Why your build mattersWhy your build matters
Why your build matters
 
RWD
RWDRWD
RWD
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 

More from James Stone

Easy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistEasy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistJames Stone
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSSJames Stone
 
Living Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapLiving Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapJames Stone
 
ZURB Foundation 5: Clean + Organized
ZURB Foundation 5: Clean + OrganizedZURB Foundation 5: Clean + Organized
ZURB Foundation 5: Clean + OrganizedJames Stone
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingJames Stone
 
ZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemJames Stone
 
Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5James Stone
 

More from James Stone (7)

Easy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React StyleguidistEasy Bolt-on Docs Using React Styleguidist
Easy Bolt-on Docs Using React Styleguidist
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSS
 
Living Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own BootstrapLiving Styleguides: Build Your Own Bootstrap
Living Styleguides: Build Your Own Bootstrap
 
ZURB Foundation 5: Clean + Organized
ZURB Foundation 5: Clean + OrganizedZURB Foundation 5: Clean + Organized
ZURB Foundation 5: Clean + Organized
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
 
ZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the EcosystemZURB Foundation 5 -- Understanding the Ecosystem
ZURB Foundation 5 -- Understanding the Ecosystem
 
Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5Canvas Only: Creative Coding in HTML5
Canvas Only: Creative Coding in HTML5
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Turku loves-storybook-styleguidist-styled-components

  • 1.
  • 2. How to build and document systems in a reactish way
  • 4. ZURB Foundation Top Contributor, Certified Preferred, etc.
  • 5. Agenda ‣ React Ecosystem and Design Systems ‣ Explore each: Storybook, Styleguidist, and Styled Components ‣ Links to github starter repos where you can try it out quickly ‣ Questions and Discussion
  • 6. The React Ecosystem ‣ Focus on JavaScript Ways of Working ‣ Webpack (usually) ‣ CRA (or similar to ejected tooling)
  • 7. The React Ecosystem part 2 ‣ Movement towards Typescript (fingers crossed) ‣ Granular self-contained isolated components ‣ Redux store / state kind of becoming standard ‣ CSS kind of sucks... more on that later
  • 8.
  • 9. The Desgin System Ecosystem aka UI Component Library ‣ Component Builders ‣ Living (Coded) Styleguides
  • 10. Workshop vs. Storefront – Brad Frost source: Storybook vs Styleguidist, Chroma further reading: The Workshop and the Storefront, Brad Frost
  • 11. Backend (the workshop) vs. Frontend (the storefront) ‣ What is useful to devs + designers ‣ How can we share beyond the team in the organization ‣ What is a good breakpoint for the overlap
  • 12. Storybook - the workshop ‣ You write stories in JavaScript files that are decoupled ‣ All about how you describe components ‣ Great for visual edge cases, both for testing and exposing to design source: React Styleguidist Cookbook
  • 13. STORYBOOK EXAMPLE import React from "react"; import { storiesOf } from "@storybook/react"; import { action } from "@storybook/addon-actions"; import Button from "../components/Button"; storiesOf("Button", module).add("default", () => ( <Button onClick={action("clicked")}>Push Me</Button> ));
  • 14. Container Component Model FTW ‣ Great for testing the components across many variations ‣ Mock click handlers with @storybook/addon-actions ‣ Stub in data in situ with @storybook/addon-knobs ‣ A bunch of other stuff (regression testing, notes, etc.)
  • 15. style guide as the happy home where all that design system stuff lives –Brad Frost (emphasis mine) source: The Workshop and the Storefront, Brad Frost
  • 16. Styleguidist - the storefront ‣ Auto public method docs ‣ All components on a single page (Styleguide) ‣ Extra docs added (Design System or More complete docs) ‣ Can be branded (customizable design) (also possible in storybook v5) ‣ You get some docs auto generated
  • 17. REACT STYLEGUIDIST EXAMPLE (FENCES REMOVED) <Button onClick={() => console.log('clicked')>Push Me</Button>
  • 18. What about CSS? ‣ In react it kind of sucks ‣ Styles, but no :hover and similar states making it useless alone ‣ Import css via webpack, what is this 1996 ‣ Sass or some sort of other extra build pipeline or webpack config ‣ CSS in JS - this has really matured in the last year
  • 19. Styled Components ‣ It sounds complicated but it can be really simple ‣ Allows you to easily port existing CSS based projects ‣ Themeable architecture to develop larger scaled applications ‣ Predictable and fast ‣ Highly configurable
  • 20. Styled Components Example - App.tsx import styled, { createGlobalStyle, keyframes } from "styled-components"; import styledNormalize from "styled-normalize"; ... class App extends React.Component { render() { return ( <AppWrapper> <GlobalStyle /> <Header> ... </Header> </AppWrapper> ); } }
  • 21. GlobalStyle const GlobalStyle = createGlobalStyle` ${styledNormalize} body { font-family: -apple-system, ... ... } code { font-family: source-code-pro, ... } `
  • 22. Animation Example const Rotate = keyframes` from { transform: rotate(0deg); } to { transform: rotate(360deg); } ` const Logo = styled.img` animation: ${Rotate} infinite 20s linear; height: 40vmin; `
  • 23. Header Example const Header = styled.header` background-color: #282c34; min-height: 100vh; ... `;
  • 24. You can add attributes, props and use javascript to do anything progromatic
  • 25. Some thoughts about CSS in JS ‣ Think in terms of state rather than css class names ‣ Keep things developer friendly and easy to read ‣ Allow deeper digging through imports as complexity rises
  • 26. workshop tools storefront product storybook styled components styleguidist your app
  • 27. Try it out quickly github.com/jamesstoneco/react-styleguidist-todo (React Styleguidist) github.com/jamesstoneco/foldable (CRA, Typescript, Storybook, Styleguidist, CypressIO)
  • 28. React Finland - April 2019 ‣ Maybe of interest if you want to learn more about design systems with react ‣ Design Systems Workshop by the creator of React Styleguidist