Skip to content

Commit

Permalink
(docs): clearup docs around inbound/outbound state on transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
rt2zz committed Sep 1, 2017
1 parent b1c2e33 commit 867317c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ import { createTransform, persistReducer } from 'redux-persist'

let myTransform = createTransform(
// transform state coming from redux on its way to being serialized and stored
(inboundState, key) => specialSerialize(inboundState, key),
(state, key) => specialSerialize(state, key),
// transform state coming from storage, on its way to be rehydrated into redux
(outboundState, key) => specialDeserialize(outboundState, key),
(state, key) => specialDeserialize(state, key),
// configuration options
{whitelist: ['specialKey']}
)
Expand Down
2 changes: 2 additions & 0 deletions src/createTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ type TransformConfig = {
}

export default function createTransform(
// @NOTE inbound: transform state coming from redux on its way to being serialized and stored
inbound: Function,
// @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux
outbound: Function,
config: TransformConfig = {}
) {
Expand Down

0 comments on commit 867317c

Please sign in to comment.