summaryrefslogtreecommitdiff
path: root/packages/integrations/react/client.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-08-08update formatter config (#11640)Gravatar Darius 1-2/+2
* update formatter config * format --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-22Actions: React 19 progressive enhancement support (#11071)Gravatar Ben Holmes 1-0/+11
* deps: react 19 * feat: react progressive enhancement with useActionState * refactor: revert old action state implementation * feat(test): react 19 action with useFormStatus * fix: remove unused context arg * fix: wrote actions to wrong test fixture! * deps: revert react 19 beta to 18 for actions-blog fixture * chore: remove unused overrides * chore: remove unused actions export * chore: spaces vs tabs ugh * chore: fix conflicting fixture names * chore: changeset * chore: bump changeset to minor * Actions: support React 19 `useActionState()` with progressive enhancement (#11074) * feat(ex): Like with useActionState * feat: useActionState progressive enhancement! * feat: getActionState utility * chore: revert actions-blog fixture experimentation * fix: add back actions.ts export * feat(test): Like with use action state test * fix: stub form state client-side to avoid hydration error * fix: bad .safe chaining * fix: update actionState for client call * fix: correctly resume form state client side * refactor: unify and document reactServerActionResult * feat(test): useActionState assertions * feat(docs): explain my mess * refactor: add experimental_ prefix * refactor: move all react internals to integration * chore: remove unused getIslandProps * chore: remove unused imports * chore: undo format changes * refactor: get actionResult from middleware directly * refactor: remove bad result type * fix: like button disabled timeout * chore: changeset * refactor: remove request cloning * Update .changeset/gentle-windows-enjoy.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * changeset grammar tense --------- Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08[ci] formatGravatar Erika 1-1/+1
2024-03-08Allow islands to be re-rendered with new props on page transition (#10136)Gravatar Matthew Phillips 1-4/+21
* Allow islands to be re-rendered with new props on page transition * Adjust the expected styles * Restore test expectation * Add changeset and final change * linting * Implement transition:persist-props behavior * Fix lockfile * Fix expectations * App is hyrid * Update .changeset/lovely-nails-cough.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/lovely-nails-cough.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update .changeset/lovely-nails-cough.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-02-07Fix Issues with passing void elements to React with ↵Gravatar StandardGage 1-0/+4
`experimentalReactChildren` flag set (#9849) * Create simple react element if element has no children * Fix for when element has text * add changeset * minor -> patch --------- Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-10-24[ci] formatGravatar matthewp 1-17/+20
2023-10-24Fix client hydration in experimentalReactChildren (#8898)Gravatar Matthew Phillips 1-1/+38
* Fix client hydration in experimentalReactChildren * Add tests * Add a changeset * Use recursion instead of walking * getChildren -> swap order --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-29Unmount framework components when islands are destroyed (#8264)Gravatar Nate Moore 1-3/+7
* fix(view-transitions): update persistence logic for improved unmount behavior * feat(astro): add `astro:unmount` event * feat(vue): automatically unmount islands * feat(react): automatically unmount islands * feat(react): automatically unmount islands * feat(solid): automatically dispose of islands * feat(svelte): automatically destroy of islands * feat(svelte): automatically destroy of islands * feat(solid): automatically dispose of islands * feat(preact): automatically unmount islands * chore: update changeset * fix: rebase issue * chore: add clarifying comment * chore: remove duplicate changeset * chore: add changeset
2023-08-14fix: remove react identifierPrefix from client:only (#8075)Gravatar Robin Neal 1-1/+1
This was causing React components rendered with client:only to be prefixed with null. While not technically causing any issues, it is unintended and could be considered a bug. Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-05-04[ci] formatGravatar ematipico 1-2/+2
2023-05-04Generate unique ids within each React island (#6976)Gravatar Robin Neal 1-2/+5
2022-12-19Fix spelling mistakes found by codespell and mwic (#5627)Gravatar Anders Kaseorg 1-1/+1
2022-08-25[ci] formatGravatar matthewp 1-2/+2
2022-08-25Adding time-slicing with `startTransition` to prevent hydration from ↵Gravatar Sanjaiyan Parthipan 1-3/+7
blocking the main thread for too long for those users who immediately scroll. (#4313) * Adding timeslicing for hydrating :) * update
2022-06-23Enable named slots in renderers (#3652)Gravatar Nate Moore 1-1/+4
* feat: pass all slots to renderers * refactor: pass `slots` as top-level props * test: add named slot test for frameworks * fix: nested hydration, slots that are not initially rendered * test: add nested-recursive e2e test * fix: render unmatched custom element children * chore: update lockfile * fix: unrendered slots for client:only * fix(lit): ensure lit integration uses new slots API * chore: add changeset * chore: add changesets * fix: lit slots * feat: convert dash-case or snake_case slots to camelCase for JSX * feat: remove tmpl special logic * test: add slot components-in-markdown test * refactor: prefer Object.entries.map() to for/of loop Co-authored-by: Nate Moore <nate@astro.build>
2022-05-31Improve nested and `client:only` hydration (#3455)Gravatar Nate Moore 1-0/+14
* wip: fix nested islands * fix: improve hydration for dynamic content * chore: fix bundle-size script for new files * chore: allow-list client:* directive files * fix(#3362): fix client:only behavior for React, Vue, Solid * test: add client-only e2e test * chore: update lockfile * test: fix e2e tests * test: add framework nesting e2e tests * Update packages/astro/src/runtime/client/events.ts Co-authored-by: Matthew Phillips <matthew@skypack.dev> * chore: add changeset * fix(preact): ignore hydrate roots * chore: remove `ssr` check in integrations * Revert "chore: remove `ssr` check in integrations" This reverts commit ba27eaae5514701f4b7bb6259f682fe82821a23d. * chore: add changeset Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-05-12[ci] formatGravatar matthewp 1-5/+3
2022-05-12Fix: React - Use "createRoot" instead of "hydrateRoot" for `client:only` (#3337)Gravatar Ben Holmes 1-9/+12
* feat: pass "client" directive to clientEntrypoints * refactor: remove hydration warning suppression react 17 * feat: remove hydration warning suppression react 18 * chore: changeset * fix: change metadata to options bag
2022-04-02update prettier width (#2968)Gravatar Fred K. Schott 1-1/+3
2022-03-31Add support for React 18 in @astrojs/react (#2947)Gravatar Fred K. Schott 1-4/+4
* First pass at supporting React 18 in @astrojs/react * Try marking React 18’s `react-dom/client` as external * Try a different approach to importing different React versions * Allow resolving JSON modules * Revert "Allow resolving JSON modules" This reverts commit 5279b7249c52b20fd74fe48f9f1047c9b3a117dc. * Try the separate client entrypoint approach from #2946 * Clean up diff * Trying to see something * Just keep swimming… 🐠 * update to support react 18 * add changeset * add docs Co-authored-by: delucis <swithinbank@gmail.com>
2022-03-18Astro Integration System (#2820)Gravatar Fred K. Schott 1-0/+13
* update examples * add initial integrations * update tests * update astro * update ci * get final tests working * update injectelement todo * update ben code review * respond to final code review feedback