Bjorn Lu
7adb350a37
Prevent throwing in react and solid component checks ( #11624 )
2024-08-09 20:01:25 +08:00
Darius
72c7ae9901
update formatter config ( #11640 )
...
* update formatter config
* format
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-08-08 12:12:50 +02:00
Ben Holmes
1c3265a8c9
Actions: Make .safe()
the default return value ( #11571 )
...
* feat: new orThrow types
* fix: parens on return type
* feat: switch implementation to orThrow()
* feat(e2e): update PostComment
* fix: remove callSafely from middleware
* fix: toString() for actions
* fix(e2e): more orThrow updates
* feat: remove progressive enhancement from orThrow
* fix: remove _astroActionSafe handler from react
* feat(e2e): update test to use safe calling
* chore: console log
* chore: unused import
* fix: add rewriting: true to test fixture
* fix: correctly throw for server-only actions
* chore: changeset
* fix: update type tests
* fix(test): remove .safe() chain
* docs: use "patch" with BREAKING CHANGE notice
* docs: clarify react integration in changeset
2024-07-30 11:42:52 -04:00
Ben Holmes
84189b6511
Actions: New fallback behavior with action={actions.name}
( #11570 )
...
* feat: support _astroAction query param
* feat(test): _astroAction query param
* fix: handle _actions requests from legacy fallback
* feat(e2e): new actions pattern on blog test
* feat: update React 19 adapter to use query params
* fix: remove legacy getApiContext()
* feat: ActionQueryStringInvalidError
* fix: update error description
* feat: ActionQueryStringInvalidError
* chore: comment on _actions skip
* feat: .queryString property
* chore: comment on throw new Error
* chore: better guess for "why" on query string
* chore: remove console log
* chore: changeset
* chore: changeset
2024-07-30 11:04:10 -04:00
Emanuele Stoppa
fd9da98b19
feat: refine container APIs for renderers ( #11251 )
2024-06-14 06:52:17 +01:00
Emanuele Stoppa
a6df7e877f
[ci] format
2024-06-13 13:05:54 +00:00
Emanuele Stoppa
4385bf7a4d
feat(@astrojs/react): export renderer for easy loading ( #11234 )
...
* wip
* feat(@astrojs/react): export `renderer` for easy loading
* restore change
* chore: address feedback
* revert changes
* revert changes to react integration
* update changeset
2024-06-13 14:05:06 +01:00
Ben Holmes
7be7b1a757
[ci] format
2024-05-22 12:25:50 +00:00
Ben Holmes
8ca7c731de
Actions: React 19 progressive enhancement support ( #11071 )
...
* 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-05-22 13:24:55 +01:00
Gabriele Angrisani
fd7a9ed337
fix a deprecated method in react integration using SSR: renderToStaticNodeStream ( #10893 )
...
* deprecated method renderToStaticNodeStream
* Create twelve-bulldogs-raise.md
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-04-30 08:01:21 -04:00
Emanuele Stoppa
347bdfe550
[ci] format
2024-04-17 08:38:53 +00:00
Emanuele Stoppa
dfd146f591
Revert "[ci] format" ( #10417 )
...
* Revert "[ci] format"
This reverts commit 1863727215
.
* pin dependency
* update lock
2024-03-13 09:55:24 +00:00
Houston (Bot)
1863727215
[ci] format
2024-03-13 05:53:52 +00:00
Emanuele Stoppa
2dd00a0024
chore: import sort source code, exception for the astro
package ( #10242 )
...
* chore: import sort source code, exception for the `astro` package
* fix import sorting bug
* Update packages/integrations/lit/server.js
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-27 11:15:27 +00:00
Nate Moore
60dc8da71b
[ci] format
2023-12-20 19:00:58 +00:00
Nate Moore
72b26daf69
Skip check
for known Qwik components ( #9482 )
2023-12-20 12:59:49 -06:00
Ken Powers
76b4e55894
[ci] format
2023-12-18 13:42:49 +00:00
Ken Powers
7eb9fe8a71
Fix Preact Forwarded Ref components not working in astro files when React integration is enabled ( #9403 )
...
* Fix Preact Forwarded Ref components not working in astro files when React integration is enabled
* Handle undefined $$typeof
* Add changeset
* Use Symbol.for
* ⚡
* Update .changeset/breezy-hairs-yell.md
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-12-18 13:41:44 +00:00
brandonsdebt
ac5633b8f6
Add compatibility with cloudflare node ( #8925 )
2023-11-16 21:47:46 +08:00
Matthew Phillips
4dee38711c
Fix client hydration in experimentalReactChildren ( #8898 )
...
* 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-10-24 08:05:19 -04:00
matthewp
fb31ce55d9
[ci] format
2023-08-16 17:44:01 +00:00
Matthew Phillips
16a3fdf931
Add experimentalReactChildren option to React integration ( #8082 )
...
* wip: support true react vnodes in renderer
* Add new experimentalReactChildren option to React integration
* Update the test
* Add docs
* Update packages/integrations/react/server.js
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update with a better test
* Update .changeset/yellow-snakes-jam.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/react/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/react/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-08-16 13:40:57 -04:00
Josh Goldberg ✨
2fea174303
feat: use typescript-eslint@v6's reworked configs ( #7425 )
2023-07-03 20:59:43 +08:00
matthewp
34202616c2
[ci] format
2023-05-17 14:20:24 +00:00
Matthew Phillips
3d525efc95
Prevent removal of nested slots within islands ( #7093 )
...
* Prevent removal of nested slots within islands
* Fix build errors
2023-05-17 10:18:04 -04:00
ematipico
14fd198ea5
[ci] format
2023-05-04 14:25:03 +00:00
Robin Neal
ca329bbcae
Generate unique ids within each React island ( #6976 )
2023-05-04 15:23:00 +01:00
HiDeoo
9d4bfc76e8
Support passing children
as props to a React component ( #5886 )
2023-01-25 16:31:57 -06:00
Happydev
0b12414315
remove unnecessary ReactDOM.renderToString
operation ( #5218 )
...
* remove useless `ReactDOM.renderToString` operation
* chore: add changeset
2022-10-27 21:05:18 -05:00
matthewp
91568bb055
[ci] format
2022-09-20 13:40:04 +00:00
Matthew Phillips
8d059faaed
Prevent errors in React components from crashing the dev server ( #4816 )
...
* Prevent errors in React components from crashing the dev server
* Add a changeset
* Fix test when running in the build
2022-09-20 09:38:17 -04:00
matthewp
04daafbbdf
[ci] format
2022-09-14 19:44:27 +00:00
Matthew Phillips
c271ed35ee
Only pass through children prop if there are children ( #4756 )
2022-09-14 15:42:38 -04:00
matthewp
ef7ba4507a
[ci] format
2022-09-08 16:32:36 +00:00
Matthew Phillips
5986517b4f
Make React integration work with Deno ( #4679 )
...
* Remove removed packages folder
* fix
* Add a changeset
2022-09-08 12:30:49 -04:00
Benjamin Holmes
9290b24143
Fix component frameworks on Vercel Edge ( #4667 )
...
* fix: use while instead of "for await" in react integration
* fix: cast HTML to string to fix other integrations
* docs: add comment on encode(String(html))
* chore: changeset
Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-09-07 19:41:37 -04:00
Bjorn Lu
9adb7cca33
Vite ignore unknown import ( #4527 )
2022-08-30 15:25:34 +08:00
natemoo-re
059d00bd5d
[ci] format
2022-06-23 15:12:46 +00:00
Nate Moore
7373d61cdc
Enable named slots in renderers ( #3652 )
...
* 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-06-23 10:10:54 -05:00
matthewp
8768f23f95
[ci] format
2022-04-21 16:11:09 +00:00
Matthew Phillips
ae9ac5cbdc
Fixes using React.lazy and Suspense ( #3160 )
...
* Revert "Revert "Fixes using React.lazy and Suspense""
This reverts commit e621c2f7d3
.
* Adds a changeset
* Fix ts errors
* Remove netlify metadata folder
2022-04-21 12:10:06 -04:00
Matthew Phillips
e621c2f7d3
Revert "Fixes using React.lazy and Suspense"
...
This reverts commit 700d4f9649
.
2022-04-20 17:17:36 -04:00
unknown
700d4f9649
Fixes using React.lazy and Suspense
2022-04-20 17:17:11 -04:00
Fred K. Schott
1335797903
update prettier width ( #2968 )
2022-04-02 14:15:41 -06:00
Fred K. Schott
57f48b2701
Add support for React 18 in @astrojs/react ( #2947 )
...
* 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 5279b7249c
.
* 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-31 12:51:29 -04:00
Fred K. Schott
6386c14d00
Astro Integration System ( #2820 )
...
* 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
2022-03-18 15:35:45 -07:00