-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
New hook: useInstanceId (alternative) #19091
Conversation
Co-Authored-By: Andrew Duthie <[email protected]>
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.
Should we refactor withInstanceId to use useInstanceId?
Anyway, this is cool 👍
I'll adjust it. :) |
@youknowriad Actually, I don't think we can simply use |
@ellatrix maybe something like that
|
@youknowriad Oh right, I forgot we have |
Alright, this works great and no need to modify ids in test snapshots! Merging. |
Description
Alternative to #19071, which now works exactly as
withInstanceId
. The difference with #19071 is that ids are linked to the function they are used with. Hooks that useuseInstanceId
will have to pass the parent function name.Usage:
How has this been tested?
Screenshots
Types of changes
Checklist: