Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@hofmann z/feature/cache no store #87

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Conversation

HofmannZ
Copy link
Member

@HofmannZ HofmannZ commented Nov 8, 2023

This PR removes the need to set export const dynamic = 'force-dynamic'; instead it uses the noStore api from next/cache.

Since noStore is only available in Next.js 14 and up it's marked as a breaking change.

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #87 (7f6fd39) into main (0abfe22) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #87   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines           51        53    +2     
  Branches         7         7           
=========================================
+ Hits            51        53    +2     
Files Coverage Δ
src/public-env-provider.tsx 100.00% <100.00%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@HofmannZ HofmannZ force-pushed the @HofmannZ/feature/cache-no-store branch 2 times, most recently from 947b1f0 to 02985fb Compare November 8, 2023 09:40
Using `noStore` allows more granular as it can be used on a per-component basis. Whereas `export const dynamic = 'force-dynamic'` could only be set on an entire page or layout.

BREAKING CHANGE: This version introduces a dependency on the Next.js 14 caching. It therefore only works with `"next": "^14"`.
@HofmannZ HofmannZ force-pushed the @HofmannZ/feature/cache-no-store branch from 02985fb to 7f6fd39 Compare November 8, 2023 09:58
@HofmannZ HofmannZ merged commit 53e0361 into main Nov 8, 2023
10 checks passed
@HofmannZ HofmannZ deleted the @HofmannZ/feature/cache-no-store branch November 8, 2023 10:00
@expatfile-bot
Copy link
Member

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants