hey can u explain how to create page transition in react router dom v6 with createBrowserRouter?
@timattracts5 ай бұрын
I actually prefer TanStack Router now 😁 - with TanStack Query the tech stack has the best Dev Experience. I would consider checking it out, I have a more recent video about it on my KZbin as well
@aymanechaaba Жыл бұрын
I think this is the cleanest way to fetch data in react by using loaders instead of useEffects, correct me if I'm wrong
@timattracts Жыл бұрын
You are absolutely correct. Because you will have the data already when the component renders the first time. With a useEffect the component renders without the data, then the data gets fetched, that renders with the data. I find it 1000 times cleaner in the code because you can organize your fetches outside of the components and automatically have context with useLoaderData for all the children so you don’t need to props drill or use useContext
@aymanechaaba Жыл бұрын
@@timattracts Remix changed the game bro! I hope we work on a cool project together one day! 😉