PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Discover the most effective React prompts. High-quality templates curated by experts to help you get professional AI results.
Build AI apps with Vercel AI SDK. Features: 1. useChat hook for chat UI. 2. useCompletion for text generation. 3. Streaming responses with React Server Components. 4. Edge functions for low latency. 5. Multiple provider support (OpenAI, Anthropic). 6. Route handlers for API. 7. Streaming JSON for structured data. 8. Automatic loading states. Use streamText and implement function calling.
Use Jotai's atomic approach to state. Concepts: 1. atom() for primitive state. 2. Derived atoms with get(). 3. Async atoms for data fetching. 4. atomFamily for dynamic atoms. 5. useAtom hook like useState. 6. Focus on specific atoms. 7. No string keys needed. 8. Works with Suspense. Minimal re-renders due to fine-grained subscriptions. Integrate with localStorage atoms for persistence.
Create stunning animations with Framer Motion. Techniques: 1. motion.div with animate prop. 2. Variants for orchestration. 3. Layout animations with layout prop. 4. Shared layout animations. 5. Exit animations with AnimatePresence. 6. Gesture animations (drag, tap, hover). 7. useScroll for scroll-triggered. 8. Custom spring physics. Use stagger for children and implement page transitions with ease.
Build a cross-platform desktop app with Electron and React. Architecture: 1. Main process for system APIs. 2. Renderer process with React UI. 3. IPC communication between processes. 4. Context isolation for security. 5. Auto-updater for releases. 6. Native menus and tray icons. 7. File system access and dialogs. 8. Custom window controls. Use electron-builder for packaging and implement deep linking for protocol handling.
I am starting a new web project. It will be a highly interactive single-page application (SPA) with real-time data updates. Compare and contrast React, Vue, and Angular for this project. Recommend one and justify your choice based on performance, learning curve, ecosystem, and scalability.
Explain the problem of state management in large frontend applications. What is "prop drilling"? How do libraries like Redux or Zustand solve this problem? Describe the basic concepts of a global store, actions, and reducers (or their equivalents).
You are a senior frontend architect. Generate a production-ready Next.js 14 (App Router) project using: TypeScript Tailwind CSS DaisyUI Responsive mobile-first design Clean scalable folder structure SEO optimized metadata Accessible components 📦 Project Requirements Create a modern SaaS-style landing website with 5 fully working pages: Home (/) About (/about) Services (/services) Pricing (/pricing) Contact (/contact) 🧱 Technical Setup Use Next.js 14 App Router Use Server Components by default Use "use client" only where required Configure Tailwind properly Install and configure DaisyUI theme Enable strict TypeScript Include proper ESLint config 🎨 UI Requirements Use DaisyUI components for: Navbar (sticky) Hero section Feature cards Pricing cards Contact form Footer Design must be: modern clean professional SaaS style fast loading accessible 📁 Folder Structure (IMPORTANT) Use scalable architecture: app/ layout.tsx page.tsx about/page.tsx services/page.tsx pricing/page.tsx contact/page.tsx components/ ui/Navbar.tsx ui/Footer.tsx sections/Hero.tsx sections/Features.tsx sections/Pricing.tsx lib/ constants.ts 🧩 Page Details 🏠 Home Include: Hero with CTA Features grid Pricing preview Testimonials section CTA banner 👤 About Company intro Mission/vision Team cards 🛠 Services Services grid (6 cards) Icons Hover effects 💰 Pricing 3-tier pricing table Monthly toggle UI (no backend needed) Highlight recommended plan ✉️ Contact Build a working client-side validated form with: Name Email Message Submit button with loading state Use React Hook Form + Zod validation. ⚡ Performance & SEO Add metadata in layout Use next/image where appropriate Ensure Lighthouse-friendly output No unnecessary client components 🎯 Output Requirements (VERY IMPORTANT) Provide: Full install commands Required dependencies Tailwind config DaisyUI config Complete working code files No pseudo code No missing imports Code must run without errors Generate clean, production-quality code.
Manage state simply with Zustand. Implementation: 1. create() store with actions. 2. Minimal boilerplate vs Redux. 3. No providers needed. 4. Middleware for persistence. 5. Devtools integration. 6. Slices pattern for large stores. 7. Immer for mutations. 8. TypeScript support. Use selectors to prevent unnecessary renders and implement computed values with get() in store.