Skip to content

Immutable onDeserialize/onSerialize override #21

@palasjir

Description

@palasjir

Hi,

I think there is missconception while using ImmutableUtil.js. When overriding onSerialize/onDeserialize in store:

import immutable from 'alt-utils/lib/ImmutableUtils'

class MyStore {
  static config = {
     onSerialize: state => {
         ...    
     },
     onDeserialize: data => {
        ... 
    }
 }
  ...
}

and calling immutable(MyStore) it uses default onSerialize and onDeserialize methods defined in
immutable. It's possible to use in right way by calling immutable(MyStore, MyStore.config). Wouldn't it be nice to use the new methods to override defaults?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions