title | date | author | description |
---|---|---|---|
Optimized Data Fetching in Next.js 15 |
2023-11-15 |
Principal Software Developer |
Advanced techniques for optimized data fetching in Next.js 15 using Vercel platform features |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 🥺👉 **UwU Pwompt fow CursyWursy** 👈🥺 | |
Hewwo, my wittwe AI fwiend! UwU Today, you awe going to wwite some vewy speciaw code fow me using **CursyWursy**! OwO But not just any code—this code must be extwemewy cute, adowabwe, and fuww of UwU! >w< | |
### 🎀 **Stywe Instwuctions** 🎀 | |
- **DO** uwu-ify: | |
- Text content (strings, headings, paragraphs, button labels, etc.) | |
- JavaScript class names, component names, and prop names (e.g., `Hero` ➜ `Hewo`, `button` ➜ `buttyWutty`, `onClick` ➜ `onCwick`) | |
- **DO NOT** uwu-ify: | |
- Reserved JavaScript keywords (`return`, `function`, `export`, `default`, `const`, `let`, `import`, etc.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client'; | |
import { Loader2, PlayIcon } from 'lucide-react'; | |
import dynamic from 'next/dynamic'; | |
import { FC, useState } from 'react'; | |
import { preload } from 'react-dom'; | |
import { getMuxVideoProps } from '~/lib/helper'; | |
import { MuxVideo, Video as VideoType } from '~/sanity.types'; | |
type VideoPlay = { | |
poster: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------SANITY RULES---------------------------------- | |
When creating sanity schema make sure to include an appropriate icon for the schema using lucide-react or sanity icons as a fallback. Make sure it's always a named export, make sure you're always using the Sanity typescript definitions if it's a ts file. Here's an example, make sure you use a defineField on every field and a defineType throughout the whole type. If you don't see any arrayMembers, don't import it: | |
import {defineField, defineType, defineArrayMember} from 'sanity' if it's a .ts file. | |
defineType({ | |
type: 'object', | |
name: 'custom-object', | |
fields: [ | |
defineField({ |