diff options
author | 2021-07-27 18:26:46 +0530 | |
---|---|---|
committer | 2021-07-27 08:56:46 -0400 | |
commit | 80d7415807b9834b72293928c86d1b87c1bafe9c (patch) | |
tree | f1b2b7e00f7fe8e6accc34d5f8cf5b7b271a0cfb /examples/framework-react/src/pages/index.astro | |
parent | e89a99f342912f5d382e1e23fcb66bfc2a33e0b8 (diff) | |
download | astro-80d7415807b9834b72293928c86d1b87c1bafe9c.tar.gz astro-80d7415807b9834b72293928c86d1b87c1bafe9c.tar.zst astro-80d7415807b9834b72293928c86d1b87c1bafe9c.zip |
Added undefined check for spread props (#832)
* husky setup added
* pre-commit script updated
* Revert "Feat/pre commit"
* spread issue fixed #522
* testcase added
* spread issue fixed #522
* testcase added
Diffstat (limited to 'examples/framework-react/src/pages/index.astro')
-rw-r--r-- | examples/framework-react/src/pages/index.astro | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro index 851eb6e78..79f2ddf74 100644 --- a/examples/framework-react/src/pages/index.astro +++ b/examples/framework-react/src/pages/index.astro @@ -1,7 +1,9 @@ --- // Component Imports import Counter from '../components/Counter.jsx' - +const someProps = { + count: 0, +} // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ @@ -34,7 +36,7 @@ import Counter from '../components/Counter.jsx' </head> <body> <main> - <Counter client:visible> + <Counter {...someProps} client:visible> <h1>Hello React!</h1> </Counter> </main> |