-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add integration with Redux DevTools #438
Conversation
# Conflicts: # lib/Onyx.js
07c929d
to
1c25c8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is JS and not TS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
MacOS: Chrome / Safari