export const COUNTER_COMPONENTS = { '@astrojs/renderer-preact': { filename: `src/components/PreactCounter.jsx`, content: `import { h } from 'preact'; import { useState } from 'preact/hooks'; export default function PreactCounter({ children }) { const [count, setCount] = useState(0); const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); return (
{count}
); } ` }, '@astrojs/renderer-react': { filename: `src/components/ReactCounter.jsx`, content: `import React, { useState } from 'react'; export default function ReactCounter({ children }) { const [count, setCount] = useState(0); const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); return (
{count}
); } ` }, '@astrojs/renderer-svelte': { filename: `src/components/SvelteCounter.svelte`, content: `
{ count }
` }, '@astrojs/renderer-vue': { filename: `src/components/VueCounter.vue`, content: ` ` } }; export const FRAMEWORKS = [ { title: 'Preact', value: '@astrojs/renderer-preact', }, { title: 'React', value: '@astrojs/renderer-react', }, { title: 'Svelte', value: '@astrojs/renderer-svelte', }, { title: 'Vue', value: '@astrojs/renderer-vue', } ];