From 0984ba81a3a09e2e8ac51871a0e2cc289aa5c139 Mon Sep 17 00:00:00 2001 From: Jack Matthews Date: Thu, 8 Aug 2024 18:48:28 +0100 Subject: [PATCH 1/3] docs(data-loading): fix SearchCheckbox snippet (#9830) --- contributors.yml | 1 + docs/guides/data-loading.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contributors.yml b/contributors.yml index fdb38a9648c..ed10edd92ff 100644 --- a/contributors.yml +++ b/contributors.yml @@ -277,6 +277,7 @@ - izznatsir - jacargentina - jack-r-warren +- jackhkmatthews - jacob-ebey - JacobParis - jacobwgillespie diff --git a/docs/guides/data-loading.md b/docs/guides/data-loading.md index 833ad163b06..51825c677dc 100644 --- a/docs/guides/data-loading.md +++ b/docs/guides/data-loading.md @@ -631,14 +631,14 @@ You might want to make an abstraction for checkboxes like this: function SearchCheckbox({ name, value }) { const [searchParams] = useSearchParams(); - const all = searchParams.getAll(name); + const paramsIncludeValue = searchParams.getAll(name).includes(value); const [checked, setChecked] = React.useState( - all.includes(value) + paramsIncludeValue ); React.useEffect(() => { - setChecked(all.includes(value)); - }, [all, searchParams, value]); + setChecked(paramsIncludeValue); + }, [paramsIncludeValue]); return ( Date: Thu, 8 Aug 2024 17:49:47 +0000 Subject: [PATCH 2/3] chore: format --- docs/guides/data-loading.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/data-loading.md b/docs/guides/data-loading.md index 51825c677dc..f81b6edd11a 100644 --- a/docs/guides/data-loading.md +++ b/docs/guides/data-loading.md @@ -631,7 +631,9 @@ You might want to make an abstraction for checkboxes like this: function SearchCheckbox({ name, value }) { const [searchParams] = useSearchParams(); - const paramsIncludeValue = searchParams.getAll(name).includes(value); + const paramsIncludeValue = searchParams + .getAll(name) + .includes(value); const [checked, setChecked] = React.useState( paramsIncludeValue ); From 7c0366fc73e513f55fe643291d1b5669d62ad13d Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 8 Aug 2024 14:18:35 -0400 Subject: [PATCH 3/3] Update release notes --- CHANGELOG.md | 32 +++++++++++----------- packages/remix-react/CHANGELOG.md | 2 +- packages/remix-server-runtime/CHANGELOG.md | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cc46216ea5..e48af2488d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -211,25 +211,25 @@ Date: 2024-08-05 ### Patch Changes -- Revert #9695, stop infinite reload. ([`6dd275797`](https://github.com/remix-run/remix/commit/6dd2757977d9029501b399f02c83d1010df692d1)) +- Revert #9695, stop infinite reload ([`a7cffe57`](https://github.com/remix-run/remix/commit/a7cffe5733c8b7d0f29bd2d8606876c537d87101)) ### Changes by Package -- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/create-remix/CHANGELOG.md#2111) -- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-architect/CHANGELOG.md#2111) -- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare/CHANGELOG.md#2111) -- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare-pages/CHANGELOG.md#2111) -- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare-workers/CHANGELOG.md#2111) -- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-css-bundle/CHANGELOG.md#2111) -- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-deno/CHANGELOG.md#2111) -- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-dev/CHANGELOG.md#2111) -- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-eslint-config/CHANGELOG.md#2111) -- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-express/CHANGELOG.md#2111) -- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-node/CHANGELOG.md#2111) -- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-react/CHANGELOG.md#2111) -- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-serve/CHANGELOG.md#2111) -- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-server-runtime/CHANGELOG.md#2111) -- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-testing/CHANGELOG.md#2111) +- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/create-remix/CHANGELOG.md#2111) +- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-architect/CHANGELOG.md#2111) +- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-cloudflare/CHANGELOG.md#2111) +- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-cloudflare-pages/CHANGELOG.md#2111) +- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-cloudflare-workers/CHANGELOG.md#2111) +- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-css-bundle/CHANGELOG.md#2111) +- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-deno/CHANGELOG.md#2111) +- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-dev/CHANGELOG.md#2111) +- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-eslint-config/CHANGELOG.md#2111) +- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-express/CHANGELOG.md#2111) +- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-node/CHANGELOG.md#2111) +- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-react/CHANGELOG.md#2111) +- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-serve/CHANGELOG.md#2111) +- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-server-runtime/CHANGELOG.md#2111) +- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.11.1/packages/remix-testing/CHANGELOG.md#2111) **Full Changelog**: [`v2.11.0...v2.11.1`](https://github.com/remix-run/remix/compare/remix@2.11.0...remix@2.11.1) diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 8557f4fd419..2c3cd615eb1 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- Revert #9695, stop infinite reload. ([#9833](https://github.com/remix-run/remix/pull/9833)) +- Revert #9695, stop infinite reload ([`a7cffe57`](https://github.com/remix-run/remix/commit/a7cffe5733c8b7d0f29bd2d8606876c537d87101)) - Updated dependencies: - `@remix-run/server-runtime@2.11.1` diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index 4f9cb6da0c2..2728e98e3f3 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- Revert #9695, stop infinite reload. ([#9833](https://github.com/remix-run/remix/pull/9833)) +- Revert #9695, stop infinite reload ([`a7cffe57`](https://github.com/remix-run/remix/commit/a7cffe5733c8b7d0f29bd2d8606876c537d87101)) ## 2.11.0