Comments (4)
And actually this approach doesn't work if I need to change form state outside of specific input field (for example load data to form on button click)
from form.
How does your form grow? Do you simply have a lot of inputs? Or do you have extremely deep objects as your values?
from form.
I have form which is built based on values it has, with ability to add new values. For example tariffs[0].name
, tariffs[0].price
. About 30-40 fields on average. 10-15 of them are multiselects, few text inputs and others are selects.
I've found the you provide access to formAPI via context, so this solved my problem for now. I still need to store input value somewhere (outside of form state), to be able to compare current formValue (accessible via context formAPI) with previous (stored inside of input component).
Don't think it's possible to speed it up without shouldComponentUpdate
. Also if there was an easy way to access previous value (without storing it manually), that could be useful.
Anyway, if you have better approach, let me know :)
from form.
Yeah, optimizing for extremely large forms here would potentially touch all points of the library, so I think we need to ponder how we would accomplish this a bit more before we go diving in :)
Closing this issue for now since you were able to skirt around things with access to the internal state, but let's keep the discussion going as we find better ways to optimize things.
from form.
Related Issues (20)
- Issue with array + react + numbers HOT 2
- Nested Values Disappear when using StrictMode and `pushValue` HOT 5
- Incorrect field.state.value type HOT 5
- Server Actions example leaks backend code HOT 8
- Example for array usage lacks mode="array" HOT 1
- `canSubmit` is always `true` on first render of form HOT 2
- The defaultValue of array field cannot be null HOT 2
- Type Error onServerValidate async
- DeepKeys type not working with all partial object HOT 1
- when calling field.pushValue with nested form array, then TypeError: Cannot convert undefined or null to object in Function.keys HOT 1
- Form resets to default values on some re-renders HOT 2
- Examples on homepage show error "Specified branch/tag/commit not found" HOT 1
- [DOCS]: Get the Vue Docs To Be On Par With The React Documentation HOT 2
- [DOCS]: Get the Lit Docs To Be On Par With The React Documentation
- [DOCS]: Get the Solidjs Docs To Be On Par With The React Documentation
- [DOCS]: Rewrite The Reference Docs For Users HOT 2
- [FEATURE]: Get SSR working with Nuxt.js HOT 1
- [FEATURE]: Get SSR working with Analog HOT 1
- [FEATURE]: Get SSR working with Solid Start HOT 2
- [FEATURE]: Get SSR working with TanStack Start HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form.