Dynamic Forms with Redux Form

  Рет қаралды 51,557

Stephen Grider

Stephen Grider

Күн бұрын

Пікірлер: 41
@haidermansoor6595
@haidermansoor6595 4 жыл бұрын
I don't know why people don't subscribe to this amazing guy. hats off to you man
@artturilaitakari3955
@artturilaitakari3955 7 жыл бұрын
redux forms make a simple form VERY complicated.
@Holdino_
@Holdino_ 6 жыл бұрын
2018 here. You no longer need Lodash for any of the things you used it for. Also you no longer need to bind 'this' when you call your class method. Instead you can use a class property method which handles 'this' for you.
@ApoorvMote
@ApoorvMote 8 жыл бұрын
Great video Stephen. The validation message for content would be "Enter a content". But it should be "Enter some content". It seems complicated to customise help text.
@Stephen_Grider
@Stephen_Grider 8 жыл бұрын
+Apoorv Mote Ah shoot my mistake. We could have added another piece of config to show the appropriate message.
@moveaxebx
@moveaxebx 8 жыл бұрын
Don't use lodash, but instead Array.prototype methods like .map and .forEach and pollyfill them if needed. Better readability, no library coupling and compatible with standard JS.
@jonasstromsand2396
@jonasstromsand2396 7 жыл бұрын
Are you crazy dude?
@petterk3962
@petterk3962 7 жыл бұрын
+1
@ccuenca24
@ccuenca24 6 жыл бұрын
Hi Stephen thanks for sharing, is this approach your boilet plate? or the aproach you show up in the udemy course en the chapter of redux-form? you know with the field component. Thanks
@bryan333333333333333
@bryan333333333333333 8 жыл бұрын
heeeyyy, stephen grider. recognize your voice from a react native Udemy course. good content :)
@jamiehutber9754
@jamiehutber9754 8 жыл бұрын
Which version of redux-form were you using :D Might help for future.
@_JocelioLima
@_JocelioLima 7 жыл бұрын
Stephen Grider, my react instructor in udemy :)
@tushant04
@tushant04 8 жыл бұрын
can you post videos on multiple image upload with delete feature and add feature?
@SudhanshuRamTripathi
@SudhanshuRamTripathi 5 жыл бұрын
i am not able to set "fields" array in => reduxForm({ })(ContactForm). i am using typescript right now. Thanks
@jmancherjeee
@jmancherjeee 8 жыл бұрын
Is this possible if we don't know the exact fields ahead of time. For example if we fetch a list of users and keep them in our store, and we want to create an input field for each user? I am having trouble getting redux form to recognize a more dynamic amount of inputs using this method.
@WoutMertens
@WoutMertens 8 жыл бұрын
You can create a generic configuration for each user and use the dynamic features of redux-form to use that. However, this use case is easier to do in the upcoming v6 version, redux-form.com/6.0.0-alpha.13/
@riyakapuria331
@riyakapuria331 7 жыл бұрын
Can you please give me the link for full setup for this app.
@abigwonderful
@abigwonderful 8 жыл бұрын
This was a short and sweet video. Thanks and nice work! One quick q: if I wanted to pass in default values to the FIELDS object (ie userdata), how would I render them in the renderField()? I've been trying everything I can find in redux-forms documentation, but keep striking out. Any guidance would be greatly appreciated
@WoutMertens
@WoutMertens 8 жыл бұрын
You either show placeholders with the HTML5 placeholder attribute, or you pass initialValues to the redux-form-ified object and they will show normally.
@abigwonderful
@abigwonderful 8 жыл бұрын
Thanks for following up! I ended up finding the 'initialValues' object option a day after posting the question and that was exactly what I needed! Cheers.
@__greg__
@__greg__ 8 жыл бұрын
great stuff!
@cquezel
@cquezel 6 жыл бұрын
What does this video have to do with Redux Form?
@usasikh1
@usasikh1 8 жыл бұрын
Also, would you recommend using immutable Js or not. It seems redux-form might not work with immutable js
@WoutMertens
@WoutMertens 8 жыл бұрын
Unless you have a lot of data, you don't really need ImmutableJS. Instead, you could use github.com/leoasis/redux-immutable-state-invariant during development to make sure that you are not mutating in your reducers, or github.com/rtfeldman/seamless-immutable which is like a light version of Immutable.js. However, if you can afford the ImmutableJS code size in your project (and if you don't mind the API vs plain objects), and you have quite a bit of data, it will most likely be faster than using plain objects.
@usasikh1
@usasikh1 8 жыл бұрын
thanks, I see it states this lib is only for development not production. I have been using POJOS thus far in redux.
@WoutMertens
@WoutMertens 8 жыл бұрын
Yes, seamless-immutable is basically POJOS with some helper functions and dev-env-only errors when you mutate
@marcelhumes
@marcelhumes 7 жыл бұрын
I don't know why but this.props.fields[field] in the renderField function comes up as undefined. Whereas logging this.props.fields lists [title, categories, content] I can't type it to the var fieldHelper and thus the very first 'fieldHelper.touched' throws and error. Is there some change in Redux Form syntax that went down? I've used Redux form in other ways, instructed by Stephen, that aren't as tidy. But liking the minimalism of this tut and would be nice to nail it down.
@marcelhumes1360
@marcelhumes1360 7 жыл бұрын
Sorted all of this out. Simply overthinking solutions and structuring things incorrectly.
@mdpun333
@mdpun333 7 жыл бұрын
How this was sorted. I am getting the same exception.
@hansmeiser6078
@hansmeiser6078 8 жыл бұрын
What about the key error? How to resolve this (beginner)?
@zachsosana3292
@zachsosana3292 8 жыл бұрын
how would would we go about applying validation styling logic for 'has-danger' (if form submitted without validation), 'has-warning'' (if form field has not been submitted, currently hard coded in ), and 'has-success' (as enter valid input)
@JeanAlesiagain3
@JeanAlesiagain3 8 жыл бұрын
how can I store values programmatically? e.g.: in a specific Field, when the user types foo, I want to store: { myformname: 'foo', programaticGenVal: 'some value' }
@usasikh1
@usasikh1 8 жыл бұрын
IS there ever a good reason to store local component state? OR should All state reside in Redux Store?
@WoutMertens
@WoutMertens 8 жыл бұрын
If you have a component that is a tiny part of your app, and you store its state in Redux, that means you have its code in at least two places, which is a little more work to maintain. That is the tradeoff for all the advantages that stateless apps bring, and most of the time you will be sorry for using local state.
@JeanAlesiagain3
@JeanAlesiagain3 8 жыл бұрын
Please change the title... Dynamic forms would be if you could add/remove more forms based on user input.
@GeoffreyHale
@GeoffreyHale 7 жыл бұрын
Agreed. And this video hardly had anything to do with Redux Form either. It was just a basic js DRY refactor.
@rajeevsharma2404
@rajeevsharma2404 7 жыл бұрын
is it necessary to use combine reducer.. stackoverflow.com/questions/45062928/redux-form-not-working
@GifCoDigital
@GifCoDigital 7 жыл бұрын
I know this is year old but come on why on earth would you use lodash.
@aleksandrmatyka3118
@aleksandrmatyka3118 2 жыл бұрын
I know that my answer published after 4 year ahah but maybe the reason is that developers dont write custom solution every time or dont waste time to find in utils, especially when team is big and use the same, like eslint for code quality but for functions standartizing
@GeoffreyHale
@GeoffreyHale 7 жыл бұрын
This has basically nothing to do with Redux Form. This was just a basic js DRY refactor.
[React/Redux] Logicless Components with Reselect
18:09
Stephen Grider
Рет қаралды 43 М.
[Redux] The Best Way to Store Data
15:06
Stephen Grider
Рет қаралды 42 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Netflix JavaScript Talks - RxJS + Redux + React = Amazing!
37:14
Netflix Engineering
Рет қаралды 396 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 957 М.
Formik - Building React Forms easier
13:55
Monsterlessons Academy
Рет қаралды 12 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 326 М.
[Redux] - The Best Explanation of How it Works
47:19
Stephen Grider
Рет қаралды 118 М.
Erik Rasmussen | Abstracting Form State with Redux Form
1:04:26
JS Channel
Рет қаралды 36 М.
React JS Explained In 10 Minutes
10:00
Dennis Ivy
Рет қаралды 378 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 280 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 580 М.
React Drag And Drop (dnd-kit) | Beginners Tutorial
17:27
Code Complete
Рет қаралды 62 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН