Replies: 2 comments
-
This could also be extended with further functionality, like // replay-print-incremental-diff({ library: 'redux', tag: 'core', severity: 'debug', diffvalue: getState()}, 'action: %o', action) which could then result in a panel like the Redux Devtools, showing the diff of the state from action to action. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@phryneas very cool. This would be fairly easy for us / you / anyone to experiment with. Here's how i would tackle it
This would be the simple version. Of course if this is useful, we could run the analysis directly and then use the results in a redux panel or other panel. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My main use case for this is to ship predefined sets of print statements with libraries - so a user can quickly debug what is going on inside a library without requiring Replay to add specialized Devtools for every library.
In the case of Redux, that could e.g. look something like
Replay would then extract all these print statements when parsing the source maps and display them in an extra panel where they could be toggled by the user - by library, tag and log level.
So you could just enable all "redux/core/info" logs or all "ApolloClient/cache/debug" logs with one click and without having any extra runtime code or having to find the according code passages & adding log statements yourself.
Of course, this would also enable teams to add extra log statements to their codebase without littering the normal browser console, which could be super useful.
Beta Was this translation helpful? Give feedback.
All reactions