Closed andrewhooker2 closed 4 days ago
@Swiftyos If you don't mind I would like to implement this in our Application. This will help with maintaining a clean codebase that reflects to the standard practices of NextJS 14's App Router.
@Swiftyos If you don't mind I would like to implement this in our Application. This will help with maintaining a clean codebase that reflects to the standard practices of NextJS 14's App Router.
Yeah that would be fantastic
@Swiftyos Feel free to checkout the PR I've linked above.
One callout here would be that to see better UX for our users it would be ideal for use to leverage more server side components and less client side components. This would require a larger refactor consideration and is not part of this changes at the moment.
Duplicates
Summary 💡
We should implement NextJS 14's built-in loading.tsx and error.tsx file naming conventions throughout our project. This would replace the current standard React approach to loading states and error handling.
The feature should work as follows:
Examples 🌈
NextJS documentation provides excellent examples of how these conventions work:
Loading UI: https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming Error Handling: https://nextjs.org/docs/app/building-your-application/routing/error-handling
Motivation 🔦
What is the motivation behind the feature ask?
This approach has several drawbacks:
By adopting NextJS 14's conventions, we can: