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

Fix typos #2052

Merged
merged 3 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion _internal/utils/mutate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function internalMutate<Data>(
const matchedKeys: Key[] = []
for (const key of cache.keys()) {
if (
// Skip the speical useSWRInfinite keys.
// Skip the special useSWRInfinite keys.
!key.startsWith('$inf$') &&
keyFilter((cache.get(key) as { _k: Arguments })._k)
) {
Expand Down
2 changes: 1 addition & 1 deletion core/use-swr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const useSWRHandler = <Data = any, Error = any>(
const data = isUndefined(cachedData) ? fallback : cachedData
const error = cached.error

// Use a ref to store previous returned data. Use the inital data as its inital value.
// Use a ref to store previous returned data. Use the initial data as its initial value.
const laggyDataRef = useRef(data)

const returnedData = keepPreviousData
Expand Down
2 changes: 1 addition & 1 deletion examples/optimistic-ui/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function App() {
populateCache: newItem => {
setState(
<span className="success">
Succesfully mutated the resource and populated cache.
Successfully mutated the resource and populated cache.
Revalidating...
</span>
)
Expand Down