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

Info why component rerendered (feature) #1

Open
PredokMiF opened this issue Mar 20, 2023 · 1 comment
Open

Info why component rerendered (feature) #1

PredokMiF opened this issue Mar 20, 2023 · 1 comment

Comments

@PredokMiF
Copy link
Contributor

PredokMiF commented Mar 20, 2023

Sometimes you need to know which of the props have changed relative to the previous render. This is useful when debugging memoization.

API can be like this:

function MyComponent(props) {
    useRender({ props })
    ...
}

If props are not set then props changing is not logging.

@geobde
Copy link
Owner

geobde commented Mar 20, 2023

If you would like to post a PR, It would be great!!!

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