最新章節(jié)
- Summary
- Resetting the new episode form
- Rendering the result count
- Rendering episode results
- Executing side-effects
- Creating new episodes
品牌:中圖公司
上架時間:2021-07-08 09:22:42
出版社:Packt Publishing
本書數(shù)字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發(fā)行
- Summary 更新時間:2021-07-08 10:30:50
- Resetting the new episode form
- Rendering the result count
- Rendering episode results
- Executing side-effects
- Creating new episodes
- Updating new episode data
- Updating the checkboxes and slider state
- Updating the search query
- Events and state updaters
- Creating a new episode state
- Result state
- Initial application state
- Updating state and running side-effects
- Side-effects
- Initial state
- The reusable application state updater
- Immutable Architecture
- Summary
- Chaining lazy sequences and streams
- Asynchronous data and sequences
- Iterating over collections and writing lines
- Writing collection data
- Using push() and withMutations()
- Using push()
- Using concat()
- Reading large amounts of data
- Reading and parsing CSV data
- Reading data into collections
- Side-Effects in Node.js
- Summary
- Mapping episodes to elements
- Handling events and changing state
- Application state
- React side-effects
- Rendering elements
- Handling events
- Filtering episodes
- Episode template
- Rating slider
- Filter fields
- HTML markup
- DOM side-effects
- Episode results
- Filter controls
- Application data
- A simple application
- Side-Effects in User Interfaces
- Summary
- Complex behavior compositions
- Logical and/or conditions
- A generic higher-order behavior function
- Composing behavior
- Parameterizing mapped behavior
- Providing default behavior
- Parameters and defaults
- Wrapping behavior maps in functions
- Keys are logical paths values are behavior
- Mapping behavior
- Declarative Decision Making
- Summary
- Lazily interleaving values
- Lazily interposing values
- Interposing and interleaving
- Lazy sequence concatenation
- Simple value concatenation
- Concatenating lists and sequences
- Merging lists of lists
- Merging lists of maps
- Merging simple values
- Merging lists
- Merging maps with complex keys
- Merging maps by key
- Merging maps
- Combining Collections
- Summary
- List supersets
- List subsets
- Subsets and supersets
- Map differences
- Map intersections
- Comparing maps
- List differences
- Set differences
- Collection differences
- Filtering list intersections
- Reducing list intersections
- List intersections
- Ordered intersections
- Intersecting sets
- Set intersections
- Comparing Collections
- Summary
- Adding duplicate values
- Adding unique values
- Maintaining sets
- Iterating over sets
- Sorting sets
- Ordered sets
- Lazy duplicate removal
- Converting to sets then back to lists
- Converting to sets
- Removing duplicates
- Maps with keys only
- No defined iteration order
- Do not use the get() method
- Sets are not lists
- Working with Sets
- Summary
- Caching side-effects
- Detecting changes before transformations
- Transformations always return new collections
- Transformations versus mutations
- Strict equality versus deep equality
- Detecting no changes
- Detecting changes
- Strict equality and mutative methods
- Collection equality
- Persistent Change Detection
- Summary
- Flattening nested maps
- Shallow flattening lists
- Deep flattening nested lists
- Avoiding recursion
- Flattening collections
- Lazy zipping
- Zipping lists of maps
- Zipping lists of simple values
- Removing excess iterations
- Zipping collections
- Zipping and Flattening
- Summary
- The ultimate lazy pattern
- Filtering before mapping
- Multiple map() calls
- Lazy mapping
- Accumulating values
- Producing minimums and maximums
- When filtering isn't enough
- Reducing collections
- Filtering keys
- Creating new keys
- Mapping to new lists of maps
- Computing new values
- Plucking values
- Mapping lists of maps
- Mapping and Reducing
- Summary
- Is this really necessary?
- Finding the insertion index
- Maintaining sort order
- Sorting maps by key
- Creating ordered maps
- Sorting maps
- Setting the order with set()
- Insertion order is not sort order
- Order guarantees
- Ordered maps
- Sorting by multiple keys
- The sortBy() method
- Sorting lists of maps
- The reverse() method
- The sort() method
- Sorting and reversing
- Sorting Collections
- Summary
- Using slice() to paginate
- Using take() to limit results
- Limiting results and reducing work
- Multiple filter levels
- Basic lazy filtering
- Lazy filtering
- Iterating with forEach()
- Iterating with for...of loops
- Maps to sequences
- Lists to sequences
- Collections to sequences
- Basic sequence creation
- Sequence creation and iteration
- Chained operations are easy to understand
- Avoiding unnecessary work
- Large collections are expensive
- Why lazy evaluation?
- Sequences and Side-Effects
- Summary
- Using findLast() and reduceRight()
- Searching sorted collections
- Changing the search direction
- Subsets and supersets
- The shape of maps
- Partial matches
- Searching lists of maps
- Using the is() function and the equals() method
- Filtering using deep equality
- Getting values using find()
- Value existence checks
- Finding collection values
- Filtering fancy keys
- Filtering string keys
- Filtering maps by keys
- Filtering by negation
- Greater than and less than
- Strict equality
- Filtering using simple comparisons
- Filtering Collections and Finding Items
- Summary
- Keeping track of changes
- Using the clear() method
- Replacing collections with new instances
- Emptying collections
- Chaining collection removal methods
- Removing values from maps
- Removing values from lists
- Removing values from collections
- Chaining collection mutation methods
- Updating map values
- Setting map values
- Changing map values
- Updating list values
- Setting list values
- Changing list values
- Changing collection values
- Adding multiple map key-value pairs
- Pushing multiple list values
- Chaining value insertion methods
- Adding key-value pairs to maps
- Pushing values to lists
- Adding values to collections
- Persistent Changes
- Summary
- Parsing complex structures
- Parsing JavaScript objects
- Parsing JavaScript arrays
- Parsing data using the fromJS() function
- Sequences of values
- Sets of values
- Maps of values
- Lists of values
- Using the of() method
- Passing Immutable.js collections
- Passing JavaScript collections
- Records
- Stacks
- Sequences
- Ordered sets
- Sets
- Ordered maps
- Maps
- Lists
- The types of Immutable.js data
- Immutable.js constructors
- Creating Immutable Data
- Summary
- Lodash is a good bet
- What are we comparing?
- Other libraries similar to Immutable.js
- Implicit side-effects are hard to do
- Data is only created
- Subscriptions are out
- What other direction is there?
- Unidirectional data flow
- Chaining method calls
- Collection methods return new data
- A collections API
- The Immutable.js approach
- Persisting changes
- A scary class of bugs
- Deleting old data
- Mutations are destructive
- Why Immutable.js?
- Questions
- Piracy
- Errata
- Downloading the color images of this book
- Downloading the example code
- Customer support
- Reader feedback
- Conventions
- Who this book is for
- What you need for this book
- What this book covers
- Preface
- Customer Feedback
- Why subscribe?
- www.PacktPub.com
- About the Reviewer
- About the Author
- Credits
- Mastering Immutable.js
- Copyright
- Title Page
- coverpage
- coverpage
- Title Page
- Copyright
- Mastering Immutable.js
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Why subscribe?
- Customer Feedback
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Downloading the color images of this book
- Errata
- Piracy
- Questions
- Why Immutable.js?
- Mutations are destructive
- Deleting old data
- A scary class of bugs
- Persisting changes
- The Immutable.js approach
- A collections API
- Collection methods return new data
- Chaining method calls
- Unidirectional data flow
- What other direction is there?
- Subscriptions are out
- Data is only created
- Implicit side-effects are hard to do
- Other libraries similar to Immutable.js
- What are we comparing?
- Lodash is a good bet
- Summary
- Creating Immutable Data
- Immutable.js constructors
- The types of Immutable.js data
- Lists
- Maps
- Ordered maps
- Sets
- Ordered sets
- Sequences
- Stacks
- Records
- Passing JavaScript collections
- Passing Immutable.js collections
- Using the of() method
- Lists of values
- Maps of values
- Sets of values
- Sequences of values
- Parsing data using the fromJS() function
- Parsing JavaScript arrays
- Parsing JavaScript objects
- Parsing complex structures
- Summary
- Persistent Changes
- Adding values to collections
- Pushing values to lists
- Adding key-value pairs to maps
- Chaining value insertion methods
- Pushing multiple list values
- Adding multiple map key-value pairs
- Changing collection values
- Changing list values
- Setting list values
- Updating list values
- Changing map values
- Setting map values
- Updating map values
- Chaining collection mutation methods
- Removing values from collections
- Removing values from lists
- Removing values from maps
- Chaining collection removal methods
- Emptying collections
- Replacing collections with new instances
- Using the clear() method
- Keeping track of changes
- Summary
- Filtering Collections and Finding Items
- Filtering using simple comparisons
- Strict equality
- Greater than and less than
- Filtering by negation
- Filtering maps by keys
- Filtering string keys
- Filtering fancy keys
- Finding collection values
- Value existence checks
- Getting values using find()
- Filtering using deep equality
- Using the is() function and the equals() method
- Searching lists of maps
- Partial matches
- The shape of maps
- Subsets and supersets
- Changing the search direction
- Searching sorted collections
- Using findLast() and reduceRight()
- Summary
- Sequences and Side-Effects
- Why lazy evaluation?
- Large collections are expensive
- Avoiding unnecessary work
- Chained operations are easy to understand
- Sequence creation and iteration
- Basic sequence creation
- Collections to sequences
- Lists to sequences
- Maps to sequences
- Iterating with for...of loops
- Iterating with forEach()
- Lazy filtering
- Basic lazy filtering
- Multiple filter levels
- Limiting results and reducing work
- Using take() to limit results
- Using slice() to paginate
- Summary
- Sorting Collections
- Sorting and reversing
- The sort() method
- The reverse() method
- Sorting lists of maps
- The sortBy() method
- Sorting by multiple keys
- Ordered maps
- Order guarantees
- Insertion order is not sort order
- Setting the order with set()
- Sorting maps
- Creating ordered maps
- Sorting maps by key
- Maintaining sort order
- Finding the insertion index
- Is this really necessary?
- Summary
- Mapping and Reducing
- Mapping lists of maps
- Plucking values
- Computing new values
- Mapping to new lists of maps
- Creating new keys
- Filtering keys
- Reducing collections
- When filtering isn't enough
- Producing minimums and maximums
- Accumulating values
- Lazy mapping
- Multiple map() calls
- Filtering before mapping
- The ultimate lazy pattern
- Summary
- Zipping and Flattening
- Zipping collections
- Removing excess iterations
- Zipping lists of simple values
- Zipping lists of maps
- Lazy zipping
- Flattening collections
- Avoiding recursion
- Deep flattening nested lists
- Shallow flattening lists
- Flattening nested maps
- Summary
- Persistent Change Detection
- Collection equality
- Strict equality and mutative methods
- Detecting changes
- Detecting no changes
- Strict equality versus deep equality
- Transformations versus mutations
- Transformations always return new collections
- Detecting changes before transformations
- Caching side-effects
- Summary
- Working with Sets
- Sets are not lists
- Do not use the get() method
- No defined iteration order
- Maps with keys only
- Removing duplicates
- Converting to sets
- Converting to sets then back to lists
- Lazy duplicate removal
- Ordered sets
- Sorting sets
- Iterating over sets
- Maintaining sets
- Adding unique values
- Adding duplicate values
- Summary
- Comparing Collections
- Set intersections
- Intersecting sets
- Ordered intersections
- List intersections
- Reducing list intersections
- Filtering list intersections
- Collection differences
- Set differences
- List differences
- Comparing maps
- Map intersections
- Map differences
- Subsets and supersets
- List subsets
- List supersets
- Summary
- Combining Collections
- Merging maps
- Merging maps by key
- Merging maps with complex keys
- Merging lists
- Merging simple values
- Merging lists of maps
- Merging lists of lists
- Concatenating lists and sequences
- Simple value concatenation
- Lazy sequence concatenation
- Interposing and interleaving
- Lazily interposing values
- Lazily interleaving values
- Summary
- Declarative Decision Making
- Mapping behavior
- Keys are logical paths values are behavior
- Wrapping behavior maps in functions
- Parameters and defaults
- Providing default behavior
- Parameterizing mapped behavior
- Composing behavior
- A generic higher-order behavior function
- Logical and/or conditions
- Complex behavior compositions
- Summary
- Side-Effects in User Interfaces
- A simple application
- Application data
- Filter controls
- Episode results
- DOM side-effects
- HTML markup
- Filter fields
- Rating slider
- Episode template
- Filtering episodes
- Handling events
- Rendering elements
- React side-effects
- Application state
- Handling events and changing state
- Mapping episodes to elements
- Summary
- Side-Effects in Node.js
- Reading data into collections
- Reading and parsing CSV data
- Reading large amounts of data
- Using concat()
- Using push()
- Using push() and withMutations()
- Writing collection data
- Iterating over collections and writing lines
- Asynchronous data and sequences
- Chaining lazy sequences and streams
- Summary
- Immutable Architecture
- The reusable application state updater
- Initial state
- Side-effects
- Updating state and running side-effects
- Initial application state
- Result state
- Creating a new episode state
- Events and state updaters
- Updating the search query
- Updating the checkboxes and slider state
- Updating new episode data
- Creating new episodes
- Executing side-effects
- Rendering episode results
- Rendering the result count
- Resetting the new episode form
- Summary 更新時間:2021-07-08 10:30:50