Great video. I have used factory patterns in react, but never thought of using it in forms. Great idea!
@g-ytub11 ай бұрын
Excellent, thank you for very practical example. Please do continue with other design patters as well.
@lucas-barake11 ай бұрын
More to come!
@pushkarkumar557811 ай бұрын
though it is too advanced for me but learnt new thing thankyou.
@regilearn213811 ай бұрын
Please teach other patterns also related with React and example using real world, please use react for this
@yiannis_p11 ай бұрын
Thank you so much for this! Any chance we could get a link to the repo??
@lucas-barake11 ай бұрын
Added to the description!
@yiannis_p11 ай бұрын
@@lucas-barake starred and followed!
@sebastianmihaiprisacariu89756 ай бұрын
@@lucas-barake the repo does not include the factory-form.tsx file tho... :)
@anton941011 ай бұрын
this is pretty cool!
@sirtobey133711 ай бұрын
If you have tons of forms, this abstraction can be a valid option. But please don‘t build these kinds of abstractions before you actually run into such issues. Projects with 10 static forms using such abstractions are usually so much harder to maintain than just typing out these 10 forms manually…
@lucas-barake11 ай бұрын
I agree, it should never be the default approach. It depends entirely on the project requirements. If you have a dynamic form where the structure or fields can change based on user input or other conditions, using the factory pattern would be the wise choice. Or if you have hundreds of forms that are consistent. It's good to know these patterns so you know what to do when the time comes.
@dealloc11 ай бұрын
And chances are that you have multiple forms that are structured the same way also makes this kind of abstraction obsolete and makes changes that much harder when requirements/design change that may be at odds with the abstraction. So either you then end up with a leaky abstraction or end up splitting it out anyway. You're far better off by using composition. With compound components you let the consumer of the API decide where things go from a UI perspective, each component can have a minimal API surface, and you can provide sane defaults for accessibility/validation using context.
@neotom865311 ай бұрын
@@lucas-barakehey what theme do you use ? I really like it
@lucas-barake11 ай бұрын
@@neotom8653It's Dim Night.
@SachinYadav-eh7vg11 ай бұрын
Please make the form clone.
@ajayprakash116711 ай бұрын
Teach all the design pattern that are real projecr example and low level and high level design