Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dopaminedriven/nextjs-headless-wp
- Owner: DopamineDriven
- License: mit
- Created: 2022-03-14T03:18:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T07:35:44.000Z (almost 3 years ago)
- Last Synced: 2023-03-04T10:59:45.919Z (almost 2 years ago)
- Topics: apollo-client, codegen, edge, graphql, gravity, gravity-forms, headless-wordpress, jwt-authentication, nextjs, typescript, wpgraphql
- Language: TypeScript
- Homepage: https://www.andrewross.tech
- Size: 6.77 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 });
}
```