Page 1
Publish Your React Component
Share your code, Build your repo
Mark Muskardin - hackingbeauty.comSeptember 22, 2016 - San Francisco ReactJS
Page 2
2
I’m a UI Engineer(Single Page Apps with React/Redux)
Page 3
3
Web Apps are evolving…
Source: developers.google.com/web/progressive-web-apps
Page 4
4
JavaScript is evolving too…
Yesterday Today
(You should be writing in ES6 now)
Page 5
5
We have an awesome publishing system
Page 6
6
Developers have a lot of problems…
Page 7
7
Disjointed Codebases
Mobile Web Desktop Web IOS Android
Page 8
Many companies don’t just have 1 app
App 1 App 2 App 3 App 4 App 5
Page 9
9
Company UI Library
Page 10
10
(saves time and money)
* Reusability is key *
Page 11
11
Today, we do things differently
DEVELOP IN COMPONENTS
Page 12
Why publish your own component?
YOU are an evolving developer.
Page 13
13
1. You learn key engineering principles
Page 14
14
“Write programs that do one thing and do it well.
Write programs to work together.”
- The Unix Philosophy
Page 15
15
2. Helps build your portfolio
Page 17
3. It’s really easy & you get to share
Page 19
19
I want to let you in on a little secret…
Page 20
20
You don’t have to build everything from scratch
Page 21
21
REMEMBER“Write programs that do one thing and do it well.
Write programs to work together.”
Page 22
22
For example…
Write something simple
For example…
Page 24
24
Material-UI Components
Page 25
25
Material-UI Autocomplete
Page 26
26
material-ui-youtube-autocomplete 1.2.1
Page 27
27
< 100 lines of codehackingbeauty.com/create-a-reactjs-component-part1
Page 28
28
How do I start?
Page 29
29
#1 - Figure out what to build, then build it(Keep it small and focused)
Page 30
30
ui-patterns.com
Page 31
31
#2 - Write good documentation
Page 32
32
A solid README.md on Github
Show usage and an example!
Page 33
33
#3 - Build a demo (critical for UI components)
Page 34
34
Free on Github Pages
Page 35
35
#4 - Tell people
Page 36
36
reddit.com/r/reactjs
Page 37
37
Write a short blog post
Page 38
38
Make your life easier…
Page 39
39
My favorite tool: NWB
Page 40
40
* CLI for bootstrapping components/libraries
* Builds the demo page for you!!!
* Dev tools, testing, production builds, configuration
NWB (github.com/insin/nwb)
Page 41
41
React-specific tips on reusability
There’s more to know…
CSS management
Testing
Page 42
42
Thank you!hackingbeauty.com/reactbook