0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00
astro/packages/integrations/react/test/fixtures/react-component/src/pages/index.astro
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

41 lines
1.3 KiB
Text

---
import Hello from '../components/Hello.jsx';
import Later from '../components/Goodbye.vue';
import ArrowFunction from '../components/ArrowFunction.jsx';
import PropsSpread from '../components/PropsSpread.jsx';
import {Research2} from '../components/Research.jsx';
import Pure from '../components/Pure.jsx';
import TypeScriptComponent from '../components/TypeScriptComponent';
import CloneElement from '../components/CloneElement';
import WithChildren from '../components/WithChildren';
import WithId from '../components/WithId';
const someProps = {
text: 'Hello world!',
};
---
<html>
<head>
<!-- Head Stuff -->
</head>
<body>
<Hello name="static" />
<Hello name="load" client:load />
<!-- Test island deduplication, i.e. same UID as the component above. -->
<Hello name="load" client:load />
<!-- Test island deduplication account for non-render affecting props. -->
<Hello name="load" unused="" client:load />
<Later name="baby" />
<ArrowFunction />
<PropsSpread {...someProps}/>
<Research2 client:idle />
<TypeScriptComponent client:load />
<Pure />
<CloneElement />
<WithChildren client:load>test</WithChildren>
<WithChildren client:load children="test" />
<WithId client:idle />
<WithId client:idle />
</body>
</html>