How would you add a pending state in this structure? Adding useFormStatus to the shadcn button doesnt work
@mattburgess569719 годин тому
Is this coming soon like Turbopack is, or like... actually soon?
@danielcrabbe22 години тому
Having issues with this 🤯 ```$ concurrently wsrun --parallel start [0] /bin/sh: wsrun: command not found [0] wsrun exited with code 127 error Command failed with exit code 1.```
@VincentJenks22 години тому
That looks like a whole mess of gnarly boilerplate, compared to what I'm seeing in Preact signals. I'm excited about this evolution, especially because useEffect is so messy, and you're otherwise left with a myriad of non-standard, third-party options that may not be around for years. Signals brings simplicity and maturity to React, which is desperately needs. I'll wait for the standard to make it into JS and trickle down through all the frameworks.
@djorji711422 години тому
In real application should we share the whole app component of each remote app, and download it lazy? And how can I implement nested routing in this case?
@kmylodarkstar2253День тому
Hi Jack! Is there any way or make sense to do something like export type DiscriminatedAction = { [K in keyof typeof someActions]: { type: K; payload: SomeState[K extends keyof SomeState ? K : any]; // trying to define this in order to get the actions from an object and my State shape interface }; }; export const someActions = { SET_DATA: "SET_DATA", SET_SOMETHING: "SET_SOMETHING" } as const; dunno if is better just type the discriminated union with the types of: (E.G) typeof SET_DATA
@flavioneto1081День тому
hey Jack! Great video! I followed your fix for the "React form was unexpectedly submitted" case, but now as I tried to add the useFormStatus hook, it doesn't get aware of the pending state, because we are basically making our way around the "action" prop itself. Do you have an idea to solve this? Thanks!
@flavioneto1081День тому
ok sharing my workaround for this: i moved the client side validation to happen while the user fills the form, so it is not necessary for us to call the form.handleSubmit, and this frees the action behavior. steps: i deleted the "onSubmit" thing from the form and left only the action. then i changed useForm config to contain "mode: 'all'", for it to validate the form not only on submit, but also on blur and on change. and lastly i added "disabled={!form.formState.isValid}" to my submit button
@spencersablan8765День тому
Shadcn
@Dev-PhantomДень тому
I was looking for this kind of video for so long. worth watching every second.
@gamingwolf3385День тому
Great video , i learnt a lot of new tricks thank you , but i have one remark , you can give the server actions data returned from validation directly without transform it to formData 😅
@KamilLewandowski-id5xtДень тому
Hi Jack, I'm reading your book and wanted to implement pattern with suspense+error boundary, however in my next.js project catching error caused by offline microfrontend consumed by the container doesn't work. I also tried using dynamic from next but didn't work either. Is there some way to display fallback when mfe is offline in next.js app?
@jherrДень тому
Federated Modules should never be offline. They should be deployed as static assets to a static asset store (e.g. S3) or a CDN (e.g. Akamai). If properly deployed they will never be offline.
@MelroyvandenBergДень тому
Wait are we back to just the root called bootstrap?? 😊
@Dev-PhantomДень тому
cool
@Dev-PhantomДень тому
Best video for a basic understanding of micro frontends.
@Dev-PhantomДень тому
cool
@wahoobeansДень тому
Teacher Jack, question. Does subscriptions still work at scale? What if there are two server pods?
@framegrace12 дні тому
Sign in... Telemetry.... Ok. No thanks, I use the terminal for serious things.
@damiensmith38812 дні тому
TDD sounds great in theory. Even better than communism.
@RavindraSingh-lp9pl2 дні тому
plz create more such advanced topics
@avishekdas49472 дні тому
Course update??
@jherrДень тому
Working on it every day. I am genuinely getting close to the first release.
@happygofishing2 дні тому
Electron webdev garbage proprietary shitware.
@davefra3 дні тому
who uses github for logging in?
@phantazzor3 дні тому
what about vectorise a screenshot and use visual copilot ?\
@khanra173 дні тому
Why TF everyone include tabnine ? Tabnine is anything except AI. It has an early mover advantage but its suggestions are doog poop. It was a bad tool when no other tools were there and now it's worse.
@adnanimran44143 дні тому
what is that VSC extension,so cool ? Can anyone tell me ?
@adnanimran44143 дні тому
Quokka got it Thanks !
@RADIOSCATRACHASUTAN3 дні тому
Yeah, really like of Zustand.
@guseynismayylov19454 дні тому
window - is the best state manager
@_hugo_cruz4 дні тому
Thank you very much my dear professor. Necessary this update, a few days ago I had tested the next-auth: "5.0.0-beta.16" and there was some problem with the middleware.
@gabrielcarrizo1310День тому
I also tested with that version and can confirm that there were some import errors when using middleware. I hope it's resolved in the latest version 😅
@TheGusMP4 дні тому
Good video, but for somereason I've been getting error of "A React form was unexpectedly submitted." with this approach.
@jherr4 дні тому
Check out the updates source code in the repo.
@samuelumoh66464 дні тому
Great content, as always.
@JelteHomminga5 днів тому
great content, but unfortunately the solution is not working for me "Uncaught Error: A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead...." but unfortunately requestSubmit is not working at all
@jherr4 дні тому
Check out the updated code in the repo.
@JelteHomminga4 дні тому
@@jherr can you explain why would you do this? If we call already the formAction in the onSubmit then what is the benefit of also adding the formAction to the action attribute and the extra complexity with the ref and preventDefault ? this seem to be enough for me: <form onSubmit={handleSubmit(formAction)}>
@jherr4 дні тому
That will work fine with JavaScript enabled. It won’t work if JavaScript is disabled. If all you need is JavaScript enabled support then that works just fine.
@JelteHomminga4 дні тому
@@jherr thanks for the quick reply, but still trying to understand the benefit of the ref. Could you also do <form action={formAction} onSubmit={handleSubmit(formAction)}> if it should also work with JavaScript disabled ?
@jherr4 дні тому
@@JelteHomminga I'm sorry, I don't understand the question in the last sentence. onSubmit does not work with JavaScript disabled.
@NikosMitselos-wg9ks5 днів тому
can you create an extend tutorial about refresh token?
@nilanga895 днів тому
Thanks, is Next-Auth v5 support mobile login(react native)?
@realbigsquid5 днів тому
Kind of exciting! I wrestled with v5 for a bit a few months ago, and it had a ways to go. I was trying to work with the token and providers and had to do some hacky stuff to get it working.
@bobbyboxer26645 днів тому
This is too advanced for me. Pace is way too fast and got lost in the sauce way too quickly. Based on the comments it seems its well explained but ... yeah 😪 I feel l understand better when I see things built in real time rather than this highlight method... gives my mind some space to process things up as they appear on screen rather than being shocked by a snippet of code on screen and have it being explained real time without me having any type of context prior even if I stop the video to read the code first... anyway... I guess I'm not at this level yet womp womp
@KamalSingh-zo1ol5 днів тому
Question: How is the form resetting? I even downloaded the github code and ran on local machine. It does not reset form after successful submission. And how do i use function like form.reset()? Also 'status' only shows previous state if rendered outside of form. There are some many issues with this approach, I think it is not yet ready for production.
@emmo27795 днів тому
an even better example is to use <a>'s href
@schmellmafeet5 днів тому
Don't leak email
@FitimBytyqi-mb1pn5 днів тому
Hey Jack, great video as always, I wished you added an implementation on how to update the session both client & server side at once, I would love to see how you handle this one.
@jherr5 днів тому
Tell me more about that what does that mean to you?
@columkelly994 дні тому
In V4 the jwt function takes an optional parameter trigger which you can use to check what triggered the function (if (trigger === 'update')) and then add the new values from session to the token in that conditional. Updates can be triggered on the client from the update function which is destructured from the useSession hook.
@fitimbytyci3454 дні тому
Yeah I am aware of that but if we have a server component calling the session via auth() and as a children we have a client component calling useSession. If we trigger update via update fn from useSession and update the session in jwt callback you will notice only the client component being updated and not the server component (I don’t know why is that). In order to solve the issue I had to call router.refresh but I hoped theres a better approach. P.S Im talking about the latest version and not v4
@jherr3 дні тому
@@fitimbytyci345 There is no live connection between the client and the server. Once the server sends the page to the client it heads off to handle another request from a different client. The client actually has to make a request back to the server to get data, initiate server actions, or perform a refresh in this case. You could do something like websockets to have a live connection. But NextJS doesn't do that for you since very few sites require that functionality and there is significant overhead.
@fitimbytyci3453 дні тому
@@jherr Thanks a lot for the explanation, it makes sense. Can you elaborate more on how would I use server actions in case to get the fresh updated data?
@juviess6 днів тому
AFAIK the default base path is already api/auth
@masterwayne97906 днів тому
It is not working on app router. Do you have any fix for it?
@jherr5 днів тому
Nope. And I probably won't. NextJS is working on their own version of RSC federation. It'll probably be Next only.
@valentoMundrov6 днів тому
Thank you! ?: We don't seem to use <SessionProvider \> if we can and do get session on every component. Do we really need it?
@mattwooddc6 днів тому
we herr
@lathryx6 днів тому
I've been working on a project for school and I've recently been trying to find a simple auth solution. It just so happens that this video comes out today! 14 hours ago!! I'm amazed and pleased to say the least. This is perfect. Thank you so much.
@jackn6 днів тому
I've used Nextauth a lot but curious about Lucia as well. Thanks for another great video!
@KamalSingh-zo1ol6 днів тому
Where is the formdata type coming from?
@jherr5 днів тому
It's a built in type.
@KamalSingh-zo1ol5 днів тому
@@jherr Thank you so much. Learning this approach has been a treat. In first pass of video it was too fast to get all the concepts, but having all github code on side made everything very clear.
@sammavrs6 днів тому
Been really struggling to understand the purpose and use-case of API/ROUTE with Next. This video single handedly has gotten me to rethink my entire DB architecture. MASSIVE thank you