Skip to content

Help request: Map implementation #9

Open
@fosteman

Description

I am trying to implement set serialization, and have checkout out yours, though did not understand it.
How does it work ?
My aim is to have one of my reducers populate and read stateful Map in Redux Store, how would I do that ?

const reducer = (state = {
  statefulMap: new Map()
}, action) => {
switch
    case: {
      let newMap = new Map(state.statefulMap)
      action.newObjects.forEach(newMap.set(`${p.id},${p.search_keyword}`, 
      return Object.
return {
          statefulMap: newMap
        }
    }

Thanks for any thoughts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions