insin / insin/newforms

Performance of onChange & event validation

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
FrontEnd Performance React
Dominant language
JavaScript
Stars
634
Forks
46
PR merge metrics
No merged PRs in 30d

Description

There is a performance cost to forcing a re-render of the form's containing component when something changes.

Figure out and document some guidelines for writing your own `BoundField`-rendering React component to implement `shouldComponentUpdate()`.

Other things which will help in the short term:
- Providing a way to get all a field's mutable state from a `BoundField`
- Use `React.addons.update()` for state changes

Longer term:
- Use an immutable library for state objects.
- Switch to rendering React components for field rows & widgets

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how BoundField-rendering React components trigger containing-form re-renders and how their mutable state is exposed. Review shouldComponentUpdate(), React.addons.update(), and the listed short- and long-term ideas. Done means documented guidance for custom BoundField components plus an agreed scope for the proposed performance changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.