Skip to content

register as a function, vs. called without arguments #1684

Answered by bluebill1049
dandv asked this question in General
Discussion options

You must be logged in to vote

This problem haunting us for a long time. Going register() is our last option on the table.

Ref gets invoked after input finished mount, and invoked again when it gets removed. However, during .map React reconcile kicks in and optimize when to remove/append a real Node, so when input shuffle and swap we want the correct input to get re-register again. register() will force that to call as it's a new anonymous callback.

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@bluebill1049
Comment options

@dandv
Comment options

@bluebill1049
Comment options

@dandv
Comment options

@bluebill1049
Comment options

Answer selected by bluebill1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants