npm i @tanstack/react-query
npm i -D @tanstack/eslint-plugin-query// App.jsx
// Create a client| "use client"; | |
| import Image from "next/image"; | |
| import toast from "react-hot-toast"; | |
| import { X } from "lucide-react"; // Assuming the X icon from lucide-react is available | |
| import { Card, CardContent, CardFooter } from "./card"; | |
| import { useState, useCallback, Dispatch, SetStateAction } from "react"; | |
| import { useDropzone, FileRejection } from "react-dropzone"; | |
| type ImageDropzoneHook = { |
Setting up new yarn nextjs project
yarn create next-app my-app # Create new project my-app
yarn install # Install all dependencies
yarn dev # Run development server
yarn add lodash # Add new package
yarn remove lodash # Remove a packageDepends on what version your on. For 12 next/future/image and 13 here's a fun trick:
| const arr = document.getElementById('followers') | |
| const followers = []; | |
| arr.querySelectorAll('a[href^="/"]').forEach(a => { | |
| followers.push(a.href) | |
| }); | |
| const following = []; | |
| const arr2 = document.getElementById('following') | |
| arr2.querySelectorAll('a[href^="/"]').forEach(a => { | |
| following.push(a.href) |