Remix Singles are Awesome and Ryan Florence is the best DEMO person, to the point and crystal clear. Love these.
@GustavoDiaz933 жыл бұрын
Oh, man! Using a hidden input field brings me old good memories. I love Remix.
@BenMcHone3 жыл бұрын
I can't get enough of remix. Make the web simple again!
@Justbur11 ай бұрын
discovering these videos again today and they are awesome. 2 years old is a million years in web time but these are still amazing.
@sephiics3 жыл бұрын
"It's what ur code doesn't do" killed me
@cagdasucar3932 Жыл бұрын
Remix is so much better than Next.js. Good job!
@ronderksen3 жыл бұрын
The “bop bop bop bop”, followed by a little chuckle at 8:44 really reminded me of Bob Ross. Which is awesome. On a more serious node: you could use the form method to distinguish different forms, right? And the button value to differentiate further when needed?
@Remix-Run3 жыл бұрын
It's all HTML, so yes and yes. Do it however you like.
@Arzen843 жыл бұрын
So amazing what you guys have built so far! I cannot wait for more videos like this!
@DEV_XO2 жыл бұрын
Been watching this video with a smile on the face. This tells you all I guess! ♥💛💚💙🖤
@amir-ziaei3 жыл бұрын
Thanks Remix! These short videos are great and I love them!
@emdagon2 жыл бұрын
"Buttons are input fields" It's funny how stuff I learned 20 years ago (while reading html 4.0 spec) sounds like news now 😂 -- Awesome framework!
@Aquilalias2 жыл бұрын
Love those videos. Great commentary and always something new to learn even with a few years of experience on my back.
@tomaszgrabowski8766 Жыл бұрын
I ❤ Remix! I was so tired of Next and now I like to do a web dev once again!
@willsmith4140 Жыл бұрын
I get that it's cool in theory to use all this native functionality, but at the end of the day having this giant form with multiple hidden inputs is way less readable and maintainable to me, compared to an "onClick"
@gijsroge3 жыл бұрын
Awesome videos, thanks! Maybe a video that shows how you would approach reusable components, used on many routes that fetch and post data?
@dagoacarralero5080 Жыл бұрын
Papapapa this was fun & enlighten. What such a good tech, now I see why the REMIX
@dmbarry862 жыл бұрын
These singles are great.
@danwilloughby20883 жыл бұрын
7:09 bop bop bop bop bop bop buh bup 🤣. Can that please be the official name for that concept?
@sotr-archives1502 жыл бұрын
Throtting or debounce, there is a lodash utility for this as well.
@jacobharris39292 жыл бұрын
almost 10 years of webdev and i never thought to use a button as a form input with a value. wild stuff
@alinsimion3 жыл бұрын
Mind blown! Great job guys!
@DEV_XO2 жыл бұрын
Amazing series! Remix is just 🔥💚
@SeanLazer3 жыл бұрын
Maybe more of an architecture question but how would you scale this out to a route that has potentially dozens of mutations? For example a dashboard. I've gotten really accustomed to building reusable components that do their own data management, ie you embed the Users, Orders, and Products widgets on the dashboard page and they take care of their own data needs. How would you handle something like that in Remix without having super bloated loader and action functions?
@frontendtony3 жыл бұрын
I've not tried Remix yet, but isn't this a good candidate for nested routes? I'm trying to imagine a scenario where this would be possible where the mutations aren't in a list
@SeanLazer3 жыл бұрын
@@frontendtony that's what I was wondering, maybe the idea of like portable or embeddable routes. I just remember the rails days of a dashboard#index action where you're loading like 10 separate pieces of data in one controller action.
@tobrie19762 жыл бұрын
If you have the `Form` post to a different path via `action="/somewhereelse"`, like described at 00:01:30, ... 1. how to prevent the browser from navigating there, and 2. how to get potential server-validation errors back to render them below the input fields?
@tshddx3 жыл бұрын
I love the "use real forms" stuff, it's great to be able to dust off my PHP and Django web dev experience from 15 years ago! Has the Remix team been thinking about how to model forms in such a way that we can get TypeScript coverage between frontend (default export) and backend (loader and action exports)? Having these all in the same route module file is already such a neat developer experience, it would be even cooler to have the tooling help a little more with this stuff! I've been playing around with different ways of doing this in Remix but haven't found anything that fits naturally with the inherently untyped nature of the web APIs (e.g. FormData and input name and value attrs).
@tomrowe21813 жыл бұрын
I personally tie the form typing with validation using Zod. Someone recently created remix-validated-form as well to add onto zod or yup and just make using forms a little nicer.
@dmsnm3 жыл бұрын
Great solution. Can we get one where inputs are dependent on another input's value? Like when sub category select options are dependent upon category select value.
@tomrowe21813 жыл бұрын
This is a good use case for useFetcher OnChange of the first select, you can trigger a fetcher submission to retrieve the options for the second dropdown and populate it. Or for a normal react solution simply send all options down on first page load, and useState to track which set to show
@daoodqurashi47583 жыл бұрын
Yeahh rayan keep it comming
@simonswiss2 жыл бұрын
You are correct - I never implement an abort fetch for rapid clicking 😅
@trashAndNoStar2 жыл бұрын
Is there a sample code discussed here on a gist/repo?
@frozen_tortus2 жыл бұрын
2:47 While I like this approach, React is throwing an error for this approach since 'onClick' handler is missing. Is it possible to suppress that error? EDIT: Use defaultValue :)
@fabischkamau3 жыл бұрын
Aaah thanks i run into that problem sometime ago 🤦 but now i now i know how to handle it. Thanks you☺️🥳
@OberfeldwebelPfeffer Жыл бұрын
Why don't you use the method="delete" in the form? That way you wouldn't need to define the "_action" name on the button.
@fennecbesixdouze17943 ай бұрын
Because the browser HTML forms API doesn't support method="delete". It only supports POST and GET.
@OberfeldwebelPfeffer3 ай бұрын
I found that out a year ago. 😅 But I guess it’s good to be mentioned here for others that encounter this. So thanks for answering.
@nightshade4272 жыл бұрын
Reminds me of aspnet postback model and client side auto update using updatepanel of the early 2000s. I dig it, it's a mix of old and new.
@DaCurse03 жыл бұрын
5:25 ah yes, classic DOM clobbering 😁
@edwarddelgado9654 Жыл бұрын
I'm old school hidden but data-* on the button might also work for the id.
@amsterdamtinus8456 Жыл бұрын
As one of these old developers I would add an hidden input for the action as well, like in the olden days :)
@VincentDECAUX3 ай бұрын
I can't understand how we can't name the Form directly. Going back with hidden input is hard to maintain, read the code to find the hidden input in your Form ...
@jannekanerva9484 Жыл бұрын
What if I also wanted to create an API for the same actions (like e.g. the delete action) and provide it to my customers? Should I separate that into a different route (so duplicate it) or how is that meant to be done in remix universe?
@DenysSlipko Жыл бұрын
Thanks a lot!
@mogadanez9 ай бұрын
can we use just method="DELETE"?
@FzsHotDogInDonut Жыл бұрын
Any RTE for remix js????
@albiceleste1012 жыл бұрын
Thank you so much!
@김슬찬-g6b7 ай бұрын
which tool do you use for disalbe/enable javascript on developer mode?
@farrukhazad3 жыл бұрын
nice work dear friend , i like , nice share , stay connected
@mjg_____2 жыл бұрын
everything old is new again and I mean that in the best possible way 😅 side note, having educators create a framework makes learning it soooooo much easier.
@arek94302 ай бұрын
I have question - if there is a separate backend app meaning frontend app server would serve as a "proxy" to this backend, then what is the purpose and advantages besides SEO, to do all this complications just for the fetch calls to happen on the server (which then do fetch call to the backend anyway)? I see that application can work even without js enabled (but this is extreme rarity to happen - but still nice to have), comes with complete HTML, has SEO. But apart from this, is there anyhing else worth this gymnastics for SSR?
@royrevelt56983 жыл бұрын
Bravo! Give it a year and The Industry will wake up and start using Remix. If I may ask an unrelated question - Mr. Florence, which keyboard (and mouse) are you using in this recording? It's not mechanical, is it?
@Sm123bg3 жыл бұрын
Hello. If I had a form that added a like to a blog post or something would you recommend just removing the default submit button styling so only a font awesome icon is shown?
@stiforr87142 жыл бұрын
A replacement for _action i've been using is "intent"
@pablen8083 жыл бұрын
Yep. I did enjoy it.
@juraev00562 жыл бұрын
Hi, is _action with value being added to FormData with ? Because Chrome does not seem to include button by default if I just call new FormData(form) in fetch.
@dmytroulianov87433 жыл бұрын
just curious how it would work if I wanted to delete a few users simultaneously like clicking five times on different names with slow connection, I guess it will do the job for my last click but not for all of them right? btw really like remix and your videos
@dmytroulianov87433 жыл бұрын
nice video on concurrent mutations, thanks!
@alexmachin17852 жыл бұрын
Yeah that's what I've been thinking, like if you have a table and select multiple users how can you handle that ? I bet you can it's just a matter of understanding how.
@mrala2 жыл бұрын
8:46 type `ej` for enabling and `dj` for disabling javascript
@oussou_lessou Жыл бұрын
Holly Button !!! 😯
@barmannphoto Жыл бұрын
A user could change the values of the hidden fields before submitting. It seems like there should be a more secure way of doing this.
@TheDrokon Жыл бұрын
So the user is going to hack themselves? This is silly
@RustanJhi3 жыл бұрын
Really enjoy it. "bop bop bop bop", makes me laugh.
@ZachCurtis Жыл бұрын
The sound effects while deleting make this video! 🤣
@DanKreiger2 жыл бұрын
I don't do much, but I always used to abort unnecessary requests
@vrfjwehs2911 ай бұрын
Ohh thats how that works
@fev43 жыл бұрын
damnn! this is nice
@JLarky3 жыл бұрын
I wish action was passing $REQUEST
@fennecbesixdouze17943 ай бұрын
We're definitely going backwards here by leaps and bounds. You've just added dozens of lines of code to add the Form and the hidden inputs, when you could have had one single button with an "onClick" that receives just the iteration variable "person". All the complexity of how to take a "person" and delete it, including that dynamodb will require the id and createdAt and unwrapping those and putting them in hidden inputs etc etc: the type, the name, the gotcha of an underscore for the action, all of that could have been abstracted away; but here they have to be in your face down to the level of the DOM and the Form and input elements. The browser should be evolved to support things method="DELETE". We shouldn't go backwards 20 years as a community to a far worse developer experience.