Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dopaminedriven/nextjs-headless-wp

Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS
https://github.com/dopaminedriven/nextjs-headless-wp

apollo-client codegen edge graphql gravity gravity-forms headless-wordpress jwt-authentication nextjs typescript wpgraphql

Last synced: 2 days ago
JSON representation

Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS

Awesome Lists containing this project

README

        

# Unwrap (JSX.IntrinsicElements) Namespace in root index.d.ts

Nextjs, Headless WordPress, TypeScript, GraphQL, TailwindCSS

## On Demand Revalidation (ISR)

- can be a web hook, a click event, etc -- now ISR can be manually toggled only WHEN data changes

```ts
// location: src/pages/api/revalidate/index.ts
import type { NextApiRequest, NextApiResponse } from "next";

export default async function handler(
_req: NextApiRequest,
res: NextApiResponse<{ revalidated: boolean }>
) {
await res.unstable_revalidate("/");
return res.json({ revalidated: true });
}
```