舉報(bào)

會(huì)員
MobX Quick Start Guide
MobXisasimpleandhighlyscalablestatemanagementlibraryinJavaScript.Itsabstractionscanhelpyoumanagestateinsmalltoextremelylargeapplications.However,ifyouarejuststartingout,itisessentialtohaveaguidethatcanhelpyoutakethefirststeps.ThisbookaimstobethatguidethatwillequipyouwiththeskillsneededtouseMobXandeffectivelyhandlethestatemanagementaspectsofyourapplication.Youwillfirstlearnaboutobservables,actions,andreactions:thecoreconceptsofMobX.ToseehowMobXreallyshinesandsimplifiesstatemanagement,you'llworkthroughsomereal-worldusecases.Buildingonthesecoreconceptsandusecases,youwilllearnaboutadvancedMobX,itsAPIs,andlibrariesthatextendMobX.Bytheendofthisbook,youwillnotonlyhaveasolidconceptualunderstandingofMobX,butalsopracticalexperience.Youwillgaintheconfidencetotacklemanyofthecommonstatemanagementproblemsinyourownprojects.
目錄(187章)
倒序
- 封面
- Title Page
- Copyright and Credits
- MobX Quick Start Guide
- Dedication
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Foreword
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Code in Action
- Conventions used
- Get in touch
- Reviews
- Introduction to State Management
- The client state
- Handling changes in state
- The side effect model
- A speed tour of MobX
- An observable state
- Observing the state changes
- It's time to take action
- A comparison with Redux
- Redux in a nutshell
- MobX versus Redux
- Summary
- Observables Actions and Reactions
- Technical requirements
- Observables
- Creating observables
- Observable arrays
- Observable maps
- A note on observability
- The computed observable
- Better syntax with decorators
- Actions
- Enforcing the use of actions
- Decorating actions
- Reactions
- autorun()
- reaction()
- A reactive UI
- when()
- when() with a promise
- Quick recap on reactions
- Summary
- A React App with MobX
- Technical requirements
- The book search
- Observable state and actions
- Managing the async action
- The Reactive UI
- Getting to the store
- The SearchTextField component
- The ResultsList component
- Summary
- Crafting the Observable Tree
- Technical requirements
- The shape of data
- Controlling observability
- Using @decorators
- Creating shallow observables with @observable.shallow
- Creating reference-only observables with @observable.ref
- Creating structural observables with @observable.struct
- Using the decorate() API
- Decorating with observable()
- Extending the observability
- Derived state with @computed
- Structural equality
- Modeling the stores
- Observable state
- Derived state
- Actions
- Summary
- Derivations Actions and Reactions
- Technical requirements
- Derivations (computed properties)
- Is it a side effect?
- There's more to computed()
- Error handling inside computed
- Actions
- Why an action?
- Async actions
- Wrapping with runInAction()
- flow()
- Reactions
- Configuring autorun() and reaction()
- Options for autorun()
- Options for reaction()
- When does MobX react?
- The rules
- Summary
- Handling Real-World Use Cases
- Technical requirements
- Form validation
- The interactions
- Modeling the observable state
- Onto the actions
- Completing the triad with reactions
- React components
- The UserEnrollmentForm component
- Other observer components
- Page routing
- The Cart checkout workflow
- Modeling the observable state
- A route for a step a step for a route
- The WorkflowStep
- Actions and reactions of the workflow
- Loading a step
- The HistoryTracker
- The React components
- The TemplateStepComponent
- The ShowCart component
- A state-based router
- Summary
- Special API for Special Cases
- Technical requirements
- Direct manipulation with the object API
- Granular reads and writes
- From MobX to JavaScript
- Watching the events flow by
- Hooking into the observability
- Lazy loading the temperature
- Gatekeeper of changes
- Intercepting the change
- observe() the changes
- Development utilities
- Using spy() to track the reactivity
- Tracing a reaction
- Visual debugging with mobx-react-devtools
- A few other APIs
- Querying the reactive system
- Probing deeper into the reactive system
- Summary
- Exploring mobx-utils and mobx-state-tree
- Technical requirements
- The utility functions of mobx-utils
- Visualizing async-operations with fromPromise()
- Using lazyObservable() for deferred updates
- A generalized lazyObservable() with fromResource()
- A view model to manage edits
- There is lot more to discover
- An opinionated MobX with mobx-state-tree
- Models – properties views and actions
- Defining actions on the model
- Creating derived information with views
- Fine-tuning primitive types
- Composing trees
- References and identifiers
- Referencing by types.identifier() and types.reference()
- Out-of-the-box benefits of declarative models
- Immutable snapshots
- JSON patches
- Middlewares
- Further reading
- Summary
- Mobx Internals
- Technical requirements
- A layered architecture
- The Atom
- Reading atoms at runtime
- Creating an Atom
- The atomic clock example
- ObservableValue
- ComputedValue
- Efficient computation
- Derivation
- The cycle of derivation
- Exception handling
- The API layer
- Transparent functional reactive programming
- It is Transparent...
- It is reactive...
- It is functional...
- Value Oriented Programming
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時(shí)間:2021-08-05 10:34:51
推薦閱讀
- 黑客攻防實(shí)戰(zhàn)技術(shù)完全手冊(cè):掃描、嗅探、入侵與防御
- CorelDRAW X6 中文版圖形設(shè)計(jì)實(shí)戰(zhàn)從入門(mén)到精通
- Web安全防護(hù)指南:基礎(chǔ)篇
- 物聯(lián)網(wǎng)智慧安監(jiān)技術(shù)
- 工業(yè)控制網(wǎng)絡(luò)安全技術(shù)與實(shí)踐
- 電子政務(wù)效益的經(jīng)濟(jì)分析與評(píng)價(jià)
- Django 2 by Example
- 計(jì)算機(jī)網(wǎng)絡(luò)安全實(shí)訓(xùn)教程(第二版)
- WordPress 5 Complete
- Drush User’s Guide
- Learning Windows 8 Game Development
- 物聯(lián)網(wǎng)場(chǎng)景設(shè)計(jì)與開(kāi)發(fā)(初級(jí))
- 端到端QoS網(wǎng)絡(luò)設(shè)計(jì)
- Getting Started with tmux
- INSTANT Social Media Marketing with HootSuite
- 互聯(lián)網(wǎng)安全的40個(gè)智慧洞見(jiàn)(2018)
- 加密與解密實(shí)戰(zhàn)全攻略
- Learning Dart
- WSN RFID物聯(lián)網(wǎng)原理與應(yīng)用
- 華為HCIP路由與交換技術(shù)實(shí)戰(zhàn)
- CTO說(shuō)
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)(第3版)
- 人人時(shí)代:無(wú)組織的組織力量
- 廣域網(wǎng)架構(gòu)與路由技術(shù)項(xiàng)目教程
- 企業(yè)網(wǎng)絡(luò)安全建設(shè)最佳實(shí)踐
- 物聯(lián)網(wǎng)技術(shù):智能家居工程應(yīng)用與實(shí)踐
- 下一代互聯(lián)網(wǎng)
- Progressive Web Application Development by Example
- 網(wǎng)絡(luò)安全與攻防策略:現(xiàn)代威脅應(yīng)對(duì)之道(原書(shū)第2版)
- 互聯(lián)網(wǎng)之達(dá)芬奇密碼