feat: add integration with Redux DevTools#438
feat: add integration with Redux DevTools#438AndrewGable merged 6 commits intoExpensify:mainfrom pac-guerreiro:feature/remotedev
Conversation
# Conflicts: # lib/Onyx.js
AndrewGable
left a comment
There was a problem hiding this comment.
In general this looks good to me, but going to add one more reviewer who might know the code better than I!
| @@ -0,0 +1,57 @@ | |||
| import _ from 'underscore'; | |||
There was a problem hiding this comment.
Any reason this is JS and not TS?
There was a problem hiding this comment.
@AndrewGable I thought that, like the app, we were not allowed to write .ts files yet. But I can rewrite this to .ts if you want!
There was a problem hiding this comment.
@AndrewGable So should I rewrite it to .ts or do you want me to provide a .d.ts file?
|
Can we please add some tests to show how this will be used and update the documentation with some basic instructions? |
marcaaron
left a comment
There was a problem hiding this comment.
Changes look good as far as I understand them 👍
@marcaaron Do you mean record some videos to show how this is working? I can update README with instructions on how to use the app with redux devtools 😄 |
Not necessarily videos. But some instructions on how one would use this. I'm thinking of people who have not used ReduxDevTool before and might benefit from knowing that this exists and some basic explanation for how to use it. |
302c10d
|
@marcaaron I added some instructions to the README. Let me know if it's clear to you! |
marcaaron
left a comment
There was a problem hiding this comment.
The README looks awesome. Thanks for the changes!
Is this something that we are wanting to enable on production? I can't think of a reason why not, but wonder if there is any performance issues with that. It seems like something we should only enable on staging so it would be good to have a way to opt in or out.
Thoughts?
|
cc @AndrewGable on the above. If it doesn't seem valuable though then I am 👍 on this one. |
AndrewGable
left a comment
There was a problem hiding this comment.
I think we are working on adding a hidden development menu, so maybe we can wait for that to mature a bit more then we can explore adding this to it? Seems good for now.
Details
This PR adds the ability to use React Native Onyx with Redux DevTools extension to debug writes made to the web storage.
At this time, it's not possible to jump between states from the Redux DevTools extension.
This functionality is only available in web apps.
Related Issues
N/A
Automated Tests
I added integration tests that check if all Onyx methods are registering their actions correctly on the Redux DevTools extension.
Manual Tests
N/A
Author Checklist
### Related Issuessection aboveTestssectiontoggleReportand notonIconClick)myBool && <MyComponent />.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Avataris modified, I verified thatAvataris working as expected in all cases)mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari