57426a2849
This PR updates the minimum version of React used by examples from 17.0.2 to 18.2.0. Fixes #41975 ## Bug - [x] Related issues linked using `fixes #41975` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) |
||
---|---|---|
.. | ||
lib | ||
pages | ||
public | ||
styles | ||
.gitignore | ||
package.json | ||
postcss.config.js | ||
README.md | ||
tailwind.config.js | ||
tsconfig.json |
Redis Example (with Upstash)
This example showcases how to use Redis as a data store in a Next.js project.
The example is a roadmap voting application where users can enter and vote for feature requests. It features the following:
- Users can add and upvote items (features in the roadmap)
- Users can enter their email addresses to be notified about the released items.
- The API records the ip-addresses of the voters, so it does not allow multiple votes on the same item from the same IP address.
Demo
Deploy Your Own
This examples uses Upstash (Serverless Redis Database) as its data storage. During deployment, you will be asked to connect with Upstash. The integration will help you create a free Redis database and link it to your Vercel project automatically.
How to use
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-redis roadmap
# or
yarn create next-app --example with-redis roadmap
# or
pnpm create next-app --example with-redis roadmap
Deploy it to the cloud with Vercel (Documentation).