Posts

Showing posts with the label Nextjs

Using Drizzle ORM with Nextjs and Sqlite

Image
Drizzle is comparatively simple and performant and easy to use Typescript ORM when compared to other ORMs like Prisma. It is a light weight and has zero dependencies. 

How to redirect a Nextjs route

Image
 We can use the redirect function from next/navigation module to redirect another route. In the route components page just import the module and specify the path to redirect, as follows.           import { redirect } from "next/navigation" ; export default function Home () {   redirect ( '/dashboard' )   return ( ..... .... )     

How to import JSON data in Nextjs with TS Type

Image
 Nextjs is a powerful Reactjs framework which has a good developer experience. In this post I like to show you how to import JSON data file into the Nextjs project with Typescript Type.