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

Performance via referential equality on useForm functions #30

Open
mrjackdavis opened this issue Feb 15, 2019 · 3 comments · May be fixed by #65
Open

Performance via referential equality on useForm functions #30

mrjackdavis opened this issue Feb 15, 2019 · 3 comments · May be fixed by #65

Comments

@mrjackdavis
Copy link

mrjackdavis commented Feb 15, 2019

Are you submitting a bug report or a feature request?

feature request (or more like a performance request)

What is the current behavior?

onBlur, onChange and onFocus from useForm(...).input do not maintain referential equality between renders. Therefore React.memo is hard to correctly implement.

What is the expected behavior?

Preferably the aforementioned functions (onBlur, onChange and onFocus) would be referentially equal between renders.

What's your environment?

"react-dom": "16.8.2"
"final-form": "^4.11.1"
"react-final-form-hooks": "^1.0.0"

Other information

@mrjackdavis
Copy link
Author

Hi,
This is something I'm interested in writing a PR on. But I'm finding it difficult to properly setup a development environment. Are there any dev-docs I can reference?

@erikras
Copy link
Member

erikras commented Mar 4, 2019

Great insight. 👍

The dev stuff can be hard, as we currently have no test suite. I've had some success in the past consuming a library as I write it using yalc. Good luck? 😄

@mrjackdavis
Copy link
Author

Good luck?

😆

@Jephuff Jephuff linked a pull request Feb 5, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants