SlideShare a Scribd company logo
MobX & MST
/
mail@hyunseob.me
State Management
1. MobX ? 🤔
⚡
" , ."
(observable)
MobX
observable
1 " "
render " "
render observable
2. MobX ✅
React ❌
State Management ❌
Redux ?
Easy to Use
👌
API
OOP,
TypeScript 💕
API
TypeScript 👍 ( )
3. 😖
Real Life Example )
:
..?
😔
Serialize / Deserialize
JSON observable
constructor assign
Deserialize 👿
Server Side Rendering 😣
🤦
😩
mobx serialize / deserialize
..
Store / Store
Singleton Pattern
Dependency Injection
API
Error Handling
...
4. MobX State Tree 🌳
, Redux VS MobX
Immutable
State
Pure Object
Serialize
Single Root Tree 🌳
/
Time Traveling ⏳
Redux MobX
Mutable
State 👌
Serialize
/ 💅
Time Traveling
MobX State Tree 🌳
MobX Redux
Single Tree 🌳
Mutable, But Immutable Snapshot
MobX ✅
MobX
Opinionated. .
☝
( )
TypeScript
PropTypes
🤔
Serialize / Deserialize
MobX ⭐⭐
!
observable
computed
action
MobX State Tree 🌳
Immutable ✅ (Snapshot)
State
Pure Object ✅ (Snapshot)
Serialize ✅
✅
Single Root Tree 🌳 ✅
✅
/
Time Traveling ⏳ ✅
Redux MobX
Mutable ✅
State 👌 ✅
✅
Serialize
✅
/ 💅 ✅
Time Traveling
Demo 👀
🎈
State Tree
,
observable
API
Reference ( )
Snapshot Immutable
Memoization (without reselect)
(redux-devtools, mobx-devtools, wiretab..)
( LocalStorage )
...
🙅
Magic ( )
MobX
( )
yield
When not to use MST?
"If you have a performance critical application that handles a
huge amount of mutable data, you will probably be better off by
using 'raw' MobX, which has a predictable and well-known
performance and much less overhead."
5. Practices
AppStore
UserStore NotificationStore PieStore InviteeStore ...
AppStore
UserStore NotificationStore PieStore ProjectStore ...
AdminStore
InviteeStore ActiveUserStore ...
View
Global
React State
LogInPage
LogInForm
isSubmitting
...
LogInPage
LogInForm
isSubmitting
...
LogInStore
id
Root
TodoStore UserStore
User
🙇
mail@hyunseob.me
github.com/hyunseob
twitter.com/hyunseob_

More Related Content

Similar to MobX & MST: 편안한 State Management

mobx state-tree - The new generation of the state containers
mobx state-tree - The new generation of the state containersmobx state-tree - The new generation of the state containers
mobx state-tree - The new generation of the state containers
Dmitry Zaets
 
Smarter State Management with MobX State Tree
Smarter State Management with MobX State TreeSmarter State Management with MobX State Tree
Smarter State Management with MobX State Tree
Yonatan Weisbrod
 
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobXAcademy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobX
Binary Studio
 
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Codemotion
 
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Codemotion
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
bobmcwhirter
 
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
Codemotion
 

Similar to MobX & MST: 편안한 State Management (8)

mobx state-tree - The new generation of the state containers
mobx state-tree - The new generation of the state containersmobx state-tree - The new generation of the state containers
mobx state-tree - The new generation of the state containers
 
Smarter State Management with MobX State Tree
Smarter State Management with MobX State TreeSmarter State Management with MobX State Tree
Smarter State Management with MobX State Tree
 
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobXAcademy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobX
 
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
 
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
Max Gallo - You don't know MobX State Tree - Codemotion Berlin 2018
 
04 dataaccess
04 dataaccess04 dataaccess
04 dataaccess
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
Max Gallo - You don't know MobX State Tree - Codemotion Milan 2018
 

More from HyunSeob Lee

WebAssembly 101
WebAssembly 101WebAssembly 101
WebAssembly 101
HyunSeob Lee
 
Puppeteer: Getting Started
Puppeteer: Getting StartedPuppeteer: Getting Started
Puppeteer: Getting Started
HyunSeob Lee
 
[I/O Extended 2019 Incheon] What's new in the Web
[I/O Extended 2019 Incheon] What's new in the Web[I/O Extended 2019 Incheon] What's new in the Web
[I/O Extended 2019 Incheon] What's new in the Web
HyunSeob Lee
 
컴포넌트 제대로 만들기
컴포넌트 제대로 만들기컴포넌트 제대로 만들기
컴포넌트 제대로 만들기
HyunSeob Lee
 
토스 이직기 & 적응기 (99Con)
토스 이직기 & 적응기 (99Con)토스 이직기 & 적응기 (99Con)
토스 이직기 & 적응기 (99Con)
HyunSeob Lee
 
Prettier 소개
Prettier 소개Prettier 소개
Prettier 소개
HyunSeob Lee
 
Type System in TypeScript
Type System in TypeScriptType System in TypeScript
Type System in TypeScript
HyunSeob Lee
 
개발자라면, 블로그
개발자라면, 블로그개발자라면, 블로그
개발자라면, 블로그
HyunSeob Lee
 
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
HyunSeob Lee
 
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
HyunSeob Lee
 

More from HyunSeob Lee (10)

WebAssembly 101
WebAssembly 101WebAssembly 101
WebAssembly 101
 
Puppeteer: Getting Started
Puppeteer: Getting StartedPuppeteer: Getting Started
Puppeteer: Getting Started
 
[I/O Extended 2019 Incheon] What's new in the Web
[I/O Extended 2019 Incheon] What's new in the Web[I/O Extended 2019 Incheon] What's new in the Web
[I/O Extended 2019 Incheon] What's new in the Web
 
컴포넌트 제대로 만들기
컴포넌트 제대로 만들기컴포넌트 제대로 만들기
컴포넌트 제대로 만들기
 
토스 이직기 & 적응기 (99Con)
토스 이직기 & 적응기 (99Con)토스 이직기 & 적응기 (99Con)
토스 이직기 & 적응기 (99Con)
 
Prettier 소개
Prettier 소개Prettier 소개
Prettier 소개
 
Type System in TypeScript
Type System in TypeScriptType System in TypeScript
Type System in TypeScript
 
개발자라면, 블로그
개발자라면, 블로그개발자라면, 블로그
개발자라면, 블로그
 
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
Unity & Visual Studio로 하는 게임개발 세미나 (손소만)
 
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
Unity & Visual Studio로 하는 게임개발 세미나 (이현섭)
 

Recently uploaded

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 

Recently uploaded (20)

Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 

MobX & MST: 편안한 State Management