Skip to content

Commit

Permalink
Fix typos (#2052)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro0218 committed Jun 27, 2022
1 parent 8166907 commit 38180b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit 38180b8

Please sign in to comment.