react component library design @walmartlabs
TRANSCRIPT
COMPONENT LIBRARYDESIGN
@CHASEADAMSIO
use react heavilyconstantly create new component librarieswant good infrastructure for development processdon't want to constantly tweak configuration & tooling
I work for WalmartLabs, where we...
CORE TENETSBuilding React Components SHOULD BE funReact Components help us move away from monolithsTweaking configuration sucks
WHAT THIS TALK IS NOTA debate on which tools are betterA deep dive on the concepts of reactA conversation about other frameworks
Component Package LifecycleDevelopingTestingDemoingPublishing
ToolingWebpack for development (server and hot reloading)Eslint linting javascript for react + es6Mocha, Chai & Sinon for writing tests and stubbing/spyingKarma for running tests in browsersIstanbul for CI coverageBabel for transpiling es6 + jsx
PUBLISHINGsrc is version controlledlib is built and published to npm
Our Project LooksLike...
Library Structure
Scripts in package.json
Dependencies in package.json
This is madness.
I just want to buildreact components.
Enter Bolt...It saves you time & config headache so you can build better.
Abstracts tooling awayProvides lots of tasksOpts for YOUR Tasks
electrode-bolt
What does theproject look like
AFTER Bolt?
Directory Structure Before / After
Scripts Before / After
Dependencies Before / After
Quickest way to get up and running:$ git clone [email protected]:chaseadamsio/electrode-react-component-boilerplate.git$ cd electrode-react-component-boilerplate && npm install$ npm run hot
Questions?@chaseadamsio on twitter