Chapter 11: Updating the table(11.4)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Instead of:
/*
export default async function Page({
searchParams,
}: {
searchParams?: {
query?: string;
page?: string;
};
}) {
const query = searchParams?.query || '';
const currentPage = Number(searchParams?.page) || 1;
*/
// Which throws an error
//Solution:
interface SearchParams {
query?: string;
page?: string;
}
export default async function Page({ searchParams }: { searchParams?: SearchParams }) {
const query = searchParams?.query || '';
const currentPage = Number(searchParams?.page) || 1;
// Error Screenshot
// After implementing Solution
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Chapter 11 and table 11.4, comparing the displayed Page example with the provided SearchParams-based solution. Update the chapter content so the example uses the working searchParams typing, then verify that it matches the post-fix behavior shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100