question is: how you make vairance.(diff actions on one route, with diff params)
@danielvega6463 ай бұрын
Tried to run it on windows and didn't work for me. rlyeh in kiruna on ci ❯ go run .\cmd\dev\ 2024/08/24 18:30:09 Kiruna initializing sidecar refresh server on port 10000 2024/08/24 18:30:13 Kiruna Go binary compilation took: 3.9350176s 2024/08/24 18:30:13 Kiruna compilation complete: dist\bin\main 2024/08/24 18:30:13 Kiruna app started with pid 17316 2024/08/24 18:30:13 Kiruna error: failed to match file: syntax error in pattern 2024/08/24 18:30:13 Kiruna error: failed to match file: syntax error in pattern 2024/08/24 18:30:13 Kiruna using disk file system (development) Starting server on: localhost:8080 template: pattern matches no files: `index.go.html`
@ajinkyax6 ай бұрын
what are your thoughts on indie-stack
@sjc56 ай бұрын
I misspoke at 6:12. It does a full refresh simply because the template needs to be reparsed after it’s edited.
@nathanm28917 ай бұрын
Why did you pass the function? It would have worked better to use an event dispatcher. You could have created a use:action event on the component for when the event is dispatched.
@eleah266510 ай бұрын
Cool. Thanks.
@mailok Жыл бұрын
This is great!
@izzy7541 Жыл бұрын
You have a very handy api. But why did you choose the snake_case style, since js uses camelCase everywhere?
@@sjc5 I agree with you 100%. But for some reason in the js community it is common to write as camelCase
@sjc5 Жыл бұрын
@@izzy7541 Yeah, camelCase definitely is the “accepted standard”. But that will never change until some people start insisting on doing it a different way!
@sjc5 Жыл бұрын
Sorry to those of you who watched the old version with super low audio volume! Hopefully this one is much better.
@sjc5 Жыл бұрын
UPDATE: An evolved version of this pattern has now been published to npm as an easily consumable toolkit: github.com/sjc5/remix-easy-mode#readme
@matanon8454 Жыл бұрын
Well done! ❤
@JonathanHigger Жыл бұрын
This seems like a good pattern, I may use this on my app
@sjc5 Жыл бұрын
Good timing, now available as a package! github.com/sjc5/remix-easy-mode#readme
@marqetintl Жыл бұрын
Question: What would the advantages of this be compared to simply re-exporting the action from the api route, which i am currently doing?
@kyuss789 Жыл бұрын
Won’t passing the actual action to your custom hook force it to be bundled in the frontend code? Which would be you would include and other back end code in your front end like the prisma client for example? Would it be better to just pass the action type as a generic to the function?
@sjc5 Жыл бұрын
Excellent point. It really should just be a generic.
@joelalexander7293 Жыл бұрын
@@sjc5 Any plan to update the repo to reflect this change? I am still new to typescript and remix, so i conceptually understand the above, but not sure what the follow on changes would be if instead of the action itself, you only had a action_type.
@sjc5 Жыл бұрын
@@joelalexander7293 Yeah good idea, should do a follow-up on this and get the repo updated.
@sjc5 Жыл бұрын
@@joelalexander7293 Now available as a package, of course addressing this concern :) github.com/sjc5/remix-easy-mode#readme
@joelalexander7293 Жыл бұрын
@@sjc5 awesome, thanks!
@SeanLazer Жыл бұрын
Really cool, but wondering if there's a reason to choose this stack vs. just going with create-t3-app in the first place?
@sjc5 Жыл бұрын
Thanks! Put simply, the SSR story isn't nearly as nice with create-t3-app as with Remix. It's totally possible to SSR, but you have to build these SSG helpers to do it in a nice way, and it's just not even close to as nice as Remix's built-in loader pattern IMO. Also, you can export hooks from Remix resource routes -- you can't export hooks from NextJS server-side files! That alone makes Remix a better DX.
@SeanLazer Жыл бұрын
@@sjc5 Awesome. So do you use this approach for data loading/mutating in conjunction with Remix's loaders/actions for other data?
@sjc5 Жыл бұрын
@@SeanLazer I think in most cases for data loading, you’ll want to use standard route-level loaders. Otherwise you’re reintroducing spinners. Similarly, for mutations involving a page transition, the standard Remix action pattern makes sense. This is more just a helper around useFetcher to make building those “same page mutation” APIs really painless.
@diegoqueiroz60542 жыл бұрын
Opa, muito bom o vídeo, sobre a questão de ter um único id, poderia usar o sistema de bind:this do próprio svelte, para vincular cada botão, não?
@johnicebergvelez44922 жыл бұрын
I wanted to add something that worked for me. I modified the way you set id for each button with a random string function and created a random id "material-*randomString*" with length 8 and inside the button component. Thank you for this tutorial by the way
@infty58292 жыл бұрын
Thanks for making this video - helped a lot!
@noto.j10452 жыл бұрын
hey man, awsome video! Everything works fine, except i get an error from vscode: on "@use '@material....' " it tells me that it "can't find the stylesheet to import". Got any suggestions?
@berrutz42112 жыл бұрын
Thanks you very much 👌
@ruans.p.53232 жыл бұрын
Thanks :)
@mackenmd2 жыл бұрын
Thank you very much for the efforts that you put into the video. Learned a few things for sure. Excellent presentation skills as well. Cheers!
@parvati273 жыл бұрын
What about a complete svelte tutorial, I like the way you explain, thank you
@dv4able3 жыл бұрын
Thank you! 😊
@sjc53 жыл бұрын
You're very welcome!
@neelsg3 жыл бұрын
Thank you. I was looking into Svelte Material UI, but the documentation sucks. This way, at least I can understand what is going on
@sjc53 жыл бұрын
Exactly! There very well may be even more efficient ways still of doing this, so let us know if you improve on the recipe.
@Sogmandl3 жыл бұрын
@@sjc5 Embrace the sveltness! The whole explicit id solution can be simplified with bind:this, allowing for a direct reference onto the button element. No need for extra work and making sure there are no name collisions. Also I feel like text should be passed as a slot, so it will handle like vanilla html. Svelte offers a lot of ways to cut down on complexity and code length, but it takes a while to get used to. Have been using it in production for about 1 1/2 years, still find new things every few weeks.