rsnext/test/development
Hannes Bornö 8b99e06e30
Improve errors caused by Next.js client hook called in a server component (#44588)
Throws if any of the Next.js client hooks are used in a server component in DEV.

```
Error: useSearchParams only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component
```

Fixes NEXT-287

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) 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`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-06 02:21:56 +00:00
..
acceptance Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
acceptance-app Improve errors caused by Next.js client hook called in a server component (#44588) 2023-01-06 02:21:56 +00:00
api-cors-with-rewrite fix(#11930): rewritten api routes can correctly handle cors in dev mode (#38937) 2022-07-29 21:39:43 -05:00
api-route-errors Resolve RSC / HTML rendering errors in error overlay (#43332) 2022-11-25 13:06:42 +01:00
basic Update flakey styled-components test (#44613) 2023-01-05 15:57:58 -08:00
basic-basepath Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
client-dev-overlay Allowing hiding the ReactDevOverlay (#37417) 2022-06-06 14:21:53 -04:00
correct-tsconfig-defaults Update flakey tsconfig test (#40105) 2022-08-30 12:31:38 -05:00
dotenv-default-expansion Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
gssp-notfound Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
jsconfig-path-reloading Upgrade typescript to 4.8.2 (#39979) 2022-08-29 16:56:02 +00:00
middleware-warnings Enable allowMiddlewareResponseBody by default (#44224) 2022-12-21 18:40:58 +00:00
next-font Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
project-directory-with-styled-jsx-suffix fix: allow user directory with styled-jsx prefix in next dev (#41484) 2022-10-19 19:01:48 +00:00
repeated-dev-edits Add test checking that repeated edits won't cause hydration issues (#44189) 2022-12-21 14:17:50 +01:00
tsconfig-path-reloading Upgrade typescript to 4.8.2 (#39979) 2022-08-29 16:56:02 +00:00
typescript-auto-install Update test config (#43661) 2022-12-03 19:49:00 -08:00
watch-config-file improve getStaticProps error message (#34287) 2022-05-22 16:50:21 -05:00
webpack-issuer-deprecation-warning fix(next): use moduleGraph.getIssuer to avoid deprecation warning (#36329) (#36330) 2022-04-21 14:14:03 +00:00