Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactJS: From upside down to right side up!
Search
Pedro Nauck
November 26, 2016
Technology
18
2.5k
ReactJS: From upside down to right side up!
My talk about how to build a right side up environment in the frontend using the React ecosystem.
Pedro Nauck
November 26, 2016
Tweet
Share
More Decks by Pedro Nauck
See All by Pedro Nauck
ReactConf 2018: Presenting Docz
pedronauck
2
660
Docz Partnership Program
pedronauck
1
190
Docz - It has never been so easy to document your things!
pedronauck
1
340
Flux: A simple architecture model to build Client-side apps!
pedronauck
55
4.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
ES6: Using the new Javascript Today
pedronauck
119
28k
Other Decks in Technology
See All in Technology
【基本】データベース設計
oracle4engineer
PRO
2
260
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
0
1.9k
20分で完全に理解するGrafanaダッシュボード
hamadakoji
5
980
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
3
420
コードや知識を組み込む / Incorporate Code and knowledge
ks91
PRO
0
160
しくじり先生、PharmaXのLLMアプリケーション開発の失敗を語る
pharma_x_tech
0
120
Cracking the KubeCon CfP
inductor
2
280
自らを知り外と繋がる、日経のエンジニア採用とDevRel活動/devreljp92
nishiuma
1
140
令和最新版 Ruby プロファイラ "Pf2" のご紹介
osyoyu
0
160
MixIT 2024 - Pulumi : Gérer son infra avec son langage de programmation préféré
ju_hnny5
1
120
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
840
BPStudyの200回を中心にIT業界を振り返る。そしてこれから
haru860
3
430
Featured
See All Featured
Web Components: a chance to create the future
zenorocha
306
41k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
How to Ace a Technical Interview
jacobian
273
22k
Bash Introduction
62gerente
605
210k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
9
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
GitHub's CSS Performance
jonrohan
1025
450k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
0
36
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
21
1.6k
Transcript
None
@pedronauck FRONTEND DEVELOPER
None
None
None
we technology new technologies
modularity performance adaptability maintainability consistency work fluid }We want
but startups...
pray to work
products upside down monsters
how build to right side up enva
backend inspiration
None
our environment front-end
checkout admin landing page react projects @reusable-modules monorepo
MODULAR STRUCTURE shazam basecss components frontend project domain reicons
monorepo Unified source code repository used by an organisation to
host as much of its code as possible.
who’s using
✓ single lint, build, test and release process ✓ easy
to coordinate changes across modules ✓ single place to report issues ✓ code review are easier ✓ less management, everything is centralized ✓ dependency management ✓ cheaper pros
✓ codebase looks more intimidating ✓ repo is bigger in
size ✓ . . . cons
None
None
None
None
None
None
None
packages/project/package.json Symbolic Link
None
components Our awesome and reusable React components
None
None
✓ focus on your components ✓ based on stories ✓
internal hot reload ✓ less configurations ✓ easy to maintain advantages
None
None
None
None
Gold tip #1 use to update data inside stories recompose
A React utility belt for function components and higher-order components.
recompose
None
None
None
None
None
None
domain data layer of our projects
AP I user partner appointments …
None
Predictable state container based on Flux One store. Single Source
of Truth! State is Read-only (modified by action) Changes are made with Pure Functions
None
#1 use a duck-based architecture
☹
None
None
None
#2 use redux-actions to handle your ducks
None
None
None
None
None
None
None
None
None
None
#3 normalize your entities
Normalizr takes JSON and a schema and replaces nested entities
with their IDs, gathering all entities in dictionaries.
turn this...
None
into
None
None
None
None
✓ work with objects, less array iterations ✓ most expressive
structure advantages
#4 use one single reducer for your entities
None
None
None
#5 use redux-ui to manage ui state
None
<App> <Topbar>
None
<App> <Topbar> <Sidebar>
None
None
None
None
None
None
None
None
None
<App> ui('App') <Sidebar> ui() <Topbar> ui() {context} {context} updateUI() ui.isSidebarOpened
{context}
modular structure module based architecture for scalable apps
None
None
App.js
None
modules/User/index.js
None
None
None
Application Setup react-router, redux, etc
shazam Node module to create and manage react apps
alternatives facebookincubator/create-react-app insin/nwb
and tricks webpack tips
#1 split your config by environment using webpack-config
None
webpack.config.js
webpack/${environment}.js
shazam.config.js
webpack/common.js
#2 use alias to relative paths
webpack/common.js
None
None
#3 use [chunkhash:8] in production bundles
webpack/development.js webpack/production.js
webpack/development.js webpack/production.js
reicons CLI tool to generate React icon components based on
svg files
manage is boring icons
None
✓ different icons of different sets ✓ components to manage
svg ✓ bundle just our icons ✓ easy to update the set ✓ build differente sets we needed
we DON' T needed
None
None
None
http://github.com/drvem/reicons
$ npm i -g reicons
$ reicons -p [<package:prefix>] -s images/ -b components/Icons Set directory
and a custom prefix The source of your icons sets Folder to bundle your icons components
. └── images ├── font-awesome │ ├── book.svg │ ├──
credit-card.svg │ └── github-logo.svg └── icons ├── home.svg ├── location.svg └── search.svg
$ reicons -p font-awesome:fa icons:ic -s images/ -b components/Icons
None
. ├── components │ └── Icons │ ├── Fa │
└── Ic └── images ├── font-awesome └── icons
. └── components └── Icons ├── Fa │ ├── Book.js
│ ├── CreditCard.js │ └── GithubLogo.js ├── Ic │ ├── Home.js │ ├── Location.js │ └── Search.js └── index.js
Fa/Book.js
index.js
None
✓ something simple to implement ✓ using across projects ✓
easy to onboarding we needed
checkout admin landing page react projects @reusable-modules monorepo
modularity performance adaptability maintainability consistency work fluid }We want
None
None