react-final-form-hooks icon indicating copy to clipboard operation
react-final-form-hooks copied to clipboard

Performance via referential equality on useForm functions

Open mrjackdavis opened this issue 6 years ago • 3 comments

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 avatar Feb 15 '19 06:02 mrjackdavis

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?

mrjackdavis avatar Feb 15 '19 06:02 mrjackdavis

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? 😄

erikras avatar Mar 04 '19 21:03 erikras

Good luck?

😆

mrjackdavis avatar Mar 15 '19 05:03 mrjackdavis