zalmoxisus / remote-redux-devtools

Redux DevTools remotely.
http://zalmoxisus.github.io/monitoring/
MIT License
1.8k stars 138 forks source link

Doesn't display item: f functionName #140

Open troywray opened 4 years ago

troywray commented 4 years ago

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.