remote-redux-devtools icon indicating copy to clipboard operation
remote-redux-devtools copied to clipboard

Doesn't display item: f functionName

Open troywray opened this issue 4 years ago • 0 comments

On storing a function, I can verify the store is fine by calling the function or inspecting store in console.

However, according to devtools, the key doesn't even exist (presumably it causes an error or evaluates to undefined)

reducer:
        stateAppSetFnVerifyCredentials: {
            reducer(state, action) {
                state.fnVerifyCredentials = action.payload.fn;
                state.fnVerifyCredentialsString = action.payload.fnString;
            }
        }
        ....
const fnPointer = fnSubmitCredentials.bind(this);
this.props.stateAppSetFnVerifyCredentials({fn: fnPointer, fnString: fnPointer.toString()});

e.g. raw shows this, i.e. fnString and fn are stored (verified) but fn just doesn't show.

{
...
    fnVerifyCredentialsString: 'function () { [native code] }'
...
}

It doesn't in the action panel either, in fact until I added fnString, action just showed type, not even a payload key.

Action panel:

{
  type: 'app/stateAppSetFnVerifyCredentials',
  payload: {
    fnString: 'function () { [native code] }'
  }
}

Suggest it should show it as f fnVerifyCredentials like console would.

troywray avatar Apr 06 '20 02:04 troywray