next js

react login api example

  const [isBookingDone, setIsBookingDone] = useState(false); const [isError, setIsError] = useState(false); const [errorMessage, setErrorMessage] = useState(”); const slotBooking = async (slotTiming, bookedDate, userId) => { let config = { url: `http://localhost:3005/api/bookings`, method: ‘POST’, headers: { ‘Content-Type’: ‘application/json’, }, data: { ‘slotTiming’: slotTiming, ‘bookedDate’: bookedDate, ‘userId’: userId }, }; await axios(config).then((res) => { loadBookingData(); setIsBookingDone(true); }).catch((e) …

react login api example Read More »

Create Next App With Tailwind CSS and TypeScript

  1. Craete nextapp      npx create-next-app your-project-name 2. Craete nextapp with tailwind css and typescript     npx create-next-app your-project-name –typescript -e with-tailwindcss 3. Craete nextapp with tailwind css only     npx create-next-app your-project-name -e with-tailwindcss 4. Craete nextapp with typescript only     npx create-next-app your-project-name –typescript