Questions tagged [next.js]
Next.js is a minimalistic framework for server-rendered React applications as well as statically exported React apps.
9 questions
4
votes
2
answers
68
views
better-SQLite3 and JS/Next.js - updating data using "transaction"- shorter / better code?
I am pretty new to SQL databases and in particular to the better-SQLite3 database. I have managed to insert, update, and delete data in a way I desire. All of it running in the background of a self-...
0
votes
0
answers
20
views
Best practice for protecting routes in Next 14 using client Firebase Authentication
I'm working on a Next 14 application where I want to protect certain pages. I implemented client auth using Firebase so currently the authentication logic runs client-side to check if the user is ...
0
votes
1
answer
36
views
Multi Step Record Creation Form with Validation Using Formik, Yup, and MUI
This component is a multistep popup form designed to handle job vacancy creation. It uses MUI for the UI, Formik and Yup for form handling and validation. The form is divided into 4 steps: Job Details,...
2
votes
1
answer
46
views
Databases, dependency injection and static methods
I'm working on a Next.js app and looking at the best way to structure database access. With Next.js and web based apps in general, there are lots of different "server actions", aka, API ...
1
vote
0
answers
116
views
Better way to parse data from nested JSON in Javascript/ NextJS
The nested JSON file contains names of US states and corresponding cities.
City.json
...
2
votes
1
answer
39
views
Do you think it's a good schema.prisma?
i'm trying to learn backend with Next JS, and i'm using Prisma + MongoDB. I want to create a simple website with a user with a cart and some products. here my schema :
...
2
votes
0
answers
830
views
React/Next.js code for a "back to top" button
Pretty new to React/Next.js. This is for a "back to top" button. Any thoughts on whether this can be improved? I haven't really got my head around when ...
1
vote
0
answers
692
views
NextJS NextAuth Implementation using Custom Token Source
I am new to NextJS, it has somewhat been forced on me and the existing code was not authenticating correctly (after a period the site would hang - not return to login - this was due to the way we were ...
4
votes
1
answer
1k
views
NextJS with a root level catchall route for all URLs dynamic middleware that splits into components
Here is the solution that I have. Due to the legacy product we have all of our URLs in one big Slug model in rails that maps URLs to models.
EG
...