舉報

會員
Hands-On Design Patterns with React Native
ReactNativehelpsdevelopersreusecodeacrossdifferentmobileplatformslikeiOSandAndroid.ThisbookwillshowyoueffectivedesignpatternsintheReactNativeworldandwillmakeyoureadyforprofessionaldevelopmentinbigteams.ThebookwillfocusonlyonthepatternsthatarerelevanttoJavaScript,ECMAScript,ReactandReactNative.However,youcansuccessfullytransferalotoftheskillsandtechniquestootherlanguages.Icallthem"Ideapatterns".ThisbookwillstartwiththemoststandarddevelopmentpatternsinReactlikecomponentbuildingpatterns,stylingpatternsinReactNativeandthenextendthesepatternstoyourmobileapplicationusingrealworldpracticalexamples.Eachchaptercomeswithfull,separatesourcecodeofapplicationsthatyoucanbuildandrunonyourphone.Thebookisalsodivingintoarchitecturalpatterns.EspeciallyhowtoadaptMVCtoReactenvironment.YouwilllearnFluxarchitectureandhowReduxisimplementingit.Eachapproachwillbepresentedwithitsprosandcons.YouwilllearnhowtoworkwithexternaldatasourcesusinglibrarieslikeReduxthunkandReduxSaga.Theendgoalistheabilitytorecognizethebestsolutionforagivenproblemforyournextmobileapplication.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Further reading
- Summary
- Using linter to enforce immutability
- readonly
品牌:中圖公司
上架時間:2021-08-13 15:11:33
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-08-13 15:13:36
- Other Books You May Enjoy
- Further reading
- Summary
- Using linter to enforce immutability
- readonly
- Immutability with TypeScript
- Structural typing
- Type inference
- Understanding TypeScript
- Generic types
- Creating union types and intersections
- enums and constants patterns
- Learning the basic types
- Configuring TypeScript
- Introduction to TypeScript
- Introduction to types
- Type Checking Patterns
- Further reading
- Summary
- Establishing conventions
- Quick wins
- Managing the code base
- React Redux aside
- Using the React Context API
- DI with React context
- Nested stories with DI
- Using the DI pattern with storybooks
- The DI pattern
- ES6 modules and beyond
- The many singleton flavors in JavaScript
- Why using the singleton pattern is discouraged
- Implementing the singleton pattern in ECMAScript
- The singleton pattern
- Managing Dependencies
- Further reading
- Summary
- React is not obsessed with pure functions
- Building abstractions
- Terminology
- Functional languages aside
- Examples of higher-order functions
- Higher-order functions
- Monad interface requirements
- Call me Maybe
- Everything but monads
- Referential transparency
- Caching pure functions
- Pure functions in Redux
- Pure functions
- Benchmark on read/write operations
- Immutability cost explained
- Immutable primitives in JavaScript
- Mutable and immutable objects
- Elements of Functional Programming Patterns
- Further reading
- Summary
- Flipping
- Currying functions
- Fighting the confusing code
- Composing functions
- Learning functions from the Ramda library
- Caching the selectors
- Selecting from the Redux store
- Selectors
- Alternatives to generators
- Making an API call to fetch task details with a generator
- Using generators as a factory for iterators
- Defining a custom iterator
- The iterator pattern
- Counting items in an array
- Using reduce to reimplement filter and map
- ES6 map filter and reduce
- JavaScript and functional programming
- JavaScript and ECMAScript Patterns
- Further reading
- Summary
- Further investigation
- Basics of React Native Navigation
- A few words on the setup
- React Native Navigation
- Issues with duplicated data
- Drawer navigation
- Tab navigation
- Multiple screens with React Navigation
- Using React Navigation
- React Navigation
- Restructuring your application
- Developers' navigation patterns
- Navigating on the same level of the graph
- Navigating between different levels of the graph
- Navigation to top-level screens
- Designers navigation patterns
- React Native navigation alternatives
- Navigation Patterns
- Further reading
- Summary
- Redux Saga benefits
- Redux Saga
- The generator pattern
- Introduction to the iterator pattern
- The saga pattern and Redux Saga
- Understanding the Thunk pattern
- Using Redux Thunk
- Benefits of refactoring to Redux
- Lifting the state to Redux
- The Thunk pattern and Redux Thunk
- Naive stateful component fetching
- Handling error scenarios
- Refactoring to activity indicator
- Fetching data with the built-in function
- Preparation
- Data Transfer Patterns
- Further reading
- Summary
- Handling side effects
- Effect patterns
- Using system storage in React Native
- Comparing Redux and MobX
- Using PropTypes with annotations
- Moving to MobX
- Creating an alternative with MobX
- Moving to a single source of truth
- Core principles of Redux
- Redux as a pattern
- Moving to Redux
- How Redux fits into Flux
- Minimal Redux application example
- Using Redux stores
- Store Patterns
- Further reading
- Questions
- Summary
- Working with side effects in Flux
- Working with side effects in MVC
- Why recognize side effects?
- What are side effects?
- Detailed Flux diagram
- Flux by example
- Replacing MVC
- Introduction to Flux
- Further issues with binding
- Event problems
- React's one-way data binding
- One-direction dataflow pattern
- Flux Architecture
- Summary
- How to measure FPS
- Measuring FPS
- Scheduling events
- The easing function
- Changing attributes over time
- What are animations?
- React Native animated
- Using the Kilo social media notation
- Truncating text
- Scaling the font down
- Solving the text overflow problem
- Styling content
- Styling flex items
- Positioning items with Flexbox
- Using the Flexible Box pattern
- Absolute and relative positioning
- Learning unitless dimensions
- Workaround for limited inheritance
- Surprising styles inheritance
- How React Native styles work
- Technical requirements
- Styling Patterns
- Summary
- Fixing errors
- Airbnb React style guide rules
- Adding a linter to create a React Native app
- Linters and code style guide
- Using HOCs instead
- Mixin example
- Why Mixins are anti-patterns
- When to use error boundaries
- Understanding error boundaries
- How error boundaries catch errors
- Introduction to error boundaries
- Uncontrolled input
- Controlled inputs
- Building forms
- Touchable opacity
- The Button component
- The TextInput component
- The Image component
- The ScrollView component
- Built-in components you need to know about
- Type checking with PropTypes
- A beginner's guide to naming
- JSX standard tricks
- Introduction to JSX
- Technical requirements
- View Patterns
- Summary
- Examples of useful HOCs
- HOC composition
- HOC
- Container component
- Decoupling styles
- Presentational components
- Test-driven development approach
- Snapshot testing expandable components
- Testing components on high-level patterns
- What about component inheritance?
- Composing the application layout
- Component composition
- What are the advantages of stateless components?
- Stateless and stateful components
- React Component Patterns
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- Packt.com
- Why subscribe?
- Packt.com
- Dedication
- Hands-On Design Patterns with React Native
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Hands-On Design Patterns with React Native
- Dedication
- Packt.com
- Why subscribe?
- Packt.com
- Contributors
- About the author
- 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
- Conventions used
- Get in touch
- Reviews
- React Component Patterns
- Stateless and stateful components
- What are the advantages of stateless components?
- Component composition
- Composing the application layout
- What about component inheritance?
- Testing components on high-level patterns
- Snapshot testing expandable components
- Test-driven development approach
- Presentational components
- Decoupling styles
- Container component
- HOC
- HOC composition
- Examples of useful HOCs
- Summary
- View Patterns
- Technical requirements
- Introduction to JSX
- JSX standard tricks
- A beginner's guide to naming
- Type checking with PropTypes
- Built-in components you need to know about
- The ScrollView component
- The Image component
- The TextInput component
- The Button component
- Touchable opacity
- Building forms
- Controlled inputs
- Uncontrolled input
- Introduction to error boundaries
- How error boundaries catch errors
- Understanding error boundaries
- When to use error boundaries
- Why Mixins are anti-patterns
- Mixin example
- Using HOCs instead
- Linters and code style guide
- Adding a linter to create a React Native app
- Airbnb React style guide rules
- Fixing errors
- Summary
- Styling Patterns
- Technical requirements
- How React Native styles work
- Surprising styles inheritance
- Workaround for limited inheritance
- Learning unitless dimensions
- Absolute and relative positioning
- Using the Flexible Box pattern
- Positioning items with Flexbox
- Styling flex items
- Styling content
- Solving the text overflow problem
- Scaling the font down
- Truncating text
- Using the Kilo social media notation
- React Native animated
- What are animations?
- Changing attributes over time
- The easing function
- Scheduling events
- Measuring FPS
- How to measure FPS
- Summary
- Flux Architecture
- One-direction dataflow pattern
- React's one-way data binding
- Event problems
- Further issues with binding
- Introduction to Flux
- Replacing MVC
- Flux by example
- Detailed Flux diagram
- What are side effects?
- Why recognize side effects?
- Working with side effects in MVC
- Working with side effects in Flux
- Summary
- Questions
- Further reading
- Store Patterns
- Using Redux stores
- Minimal Redux application example
- How Redux fits into Flux
- Moving to Redux
- Redux as a pattern
- Core principles of Redux
- Moving to a single source of truth
- Creating an alternative with MobX
- Moving to MobX
- Using PropTypes with annotations
- Comparing Redux and MobX
- Using system storage in React Native
- Effect patterns
- Handling side effects
- Summary
- Further reading
- Data Transfer Patterns
- Preparation
- Fetching data with the built-in function
- Refactoring to activity indicator
- Handling error scenarios
- Naive stateful component fetching
- The Thunk pattern and Redux Thunk
- Lifting the state to Redux
- Benefits of refactoring to Redux
- Using Redux Thunk
- Understanding the Thunk pattern
- The saga pattern and Redux Saga
- Introduction to the iterator pattern
- The generator pattern
- Redux Saga
- Redux Saga benefits
- Summary
- Further reading
- Navigation Patterns
- React Native navigation alternatives
- Designers navigation patterns
- Navigation to top-level screens
- Navigating between different levels of the graph
- Navigating on the same level of the graph
- Developers' navigation patterns
- Restructuring your application
- React Navigation
- Using React Navigation
- Multiple screens with React Navigation
- Tab navigation
- Drawer navigation
- Issues with duplicated data
- React Native Navigation
- A few words on the setup
- Basics of React Native Navigation
- Further investigation
- Summary
- Further reading
- JavaScript and ECMAScript Patterns
- JavaScript and functional programming
- ES6 map filter and reduce
- Using reduce to reimplement filter and map
- Counting items in an array
- The iterator pattern
- Defining a custom iterator
- Using generators as a factory for iterators
- Making an API call to fetch task details with a generator
- Alternatives to generators
- Selectors
- Selecting from the Redux store
- Caching the selectors
- Learning functions from the Ramda library
- Composing functions
- Fighting the confusing code
- Currying functions
- Flipping
- Summary
- Further reading
- Elements of Functional Programming Patterns
- Mutable and immutable objects
- Immutable primitives in JavaScript
- Immutability cost explained
- Benchmark on read/write operations
- Pure functions
- Pure functions in Redux
- Caching pure functions
- Referential transparency
- Everything but monads
- Call me Maybe
- Monad interface requirements
- Higher-order functions
- Examples of higher-order functions
- Functional languages aside
- Terminology
- Building abstractions
- React is not obsessed with pure functions
- Summary
- Further reading
- Managing Dependencies
- The singleton pattern
- Implementing the singleton pattern in ECMAScript
- Why using the singleton pattern is discouraged
- The many singleton flavors in JavaScript
- ES6 modules and beyond
- The DI pattern
- Using the DI pattern with storybooks
- Nested stories with DI
- DI with React context
- Using the React Context API
- React Redux aside
- Managing the code base
- Quick wins
- Establishing conventions
- Summary
- Further reading
- Type Checking Patterns
- Introduction to types
- Introduction to TypeScript
- Configuring TypeScript
- Learning the basic types
- enums and constants patterns
- Creating union types and intersections
- Generic types
- Understanding TypeScript
- Type inference
- Structural typing
- Immutability with TypeScript
- readonly
- Using linter to enforce immutability
- Summary
- Further reading
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-08-13 15:13:36