Skip to content
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

3RD party debugging(Reactotron via realm.js edition) #65

Closed
Genhain opened this issue Oct 5, 2019 · 3 comments
Closed

3RD party debugging(Reactotron via realm.js edition) #65

Genhain opened this issue Oct 5, 2019 · 3 comments

Comments

@Genhain
Copy link
Contributor

Genhain commented Oct 5, 2019

I recently made the pull request for #64 and it was not out of philanthropy and more necessity.
I am on React Native using realm.js and anyone who has tried using realm on React Native knows that it has some issues.

After browsing solutions in the issues of Realm, you will come across people mentioning Reactotron. It works wonderfully with a few tweaks.

The issue is that the Reactotron is, it does not seem to have an equivalent function of console.group() and console.groupEnd() which the default notifier of this library uses.

Now of course this library allows you you to pass in a notifier options to handle it yourself, but it has quite a fair amount of data returned to you which can be overwhelming initially for you to figure out what is going on. I have created a gist which i hope has similar behaviour to the default console. Some feedback/corrections would be appreciated as i think this is a fantastic tool but anyone using a similar stack to me might not find it easy to use.

Another thing i have noticed is that React.memo() seems to suppress why did you render logs but was supposed to be fixed in v3.3.4 as the closing comment in #50 says

@vzaidman
Copy link
Collaborator

vzaidman commented Oct 5, 2019

you can use the "onlyLogs: true" option as shown in
https://github.com/welldone-software/why-did-you-render#options
you can even pass custom

    consoleLog,
    consoleGroup,
    consoleGroupEnd,

functions (although it's not documented.)

@vzaidman
Copy link
Collaborator

vzaidman commented Oct 5, 2019

regarding React.memo,
please take a look at the tests of React.memo scenarios

https://github.com/welldone-software/why-did-you-render/blob/master/src/patches/patchMemoComponent.test.js

do you think the library misses anything? @Genhain

@vzaidman
Copy link
Collaborator

please reopen if you have any new questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants