Skip to content

Instantly share code, notes, and snippets.

@yurynix
Last active July 19, 2022 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurynix/5502915e66c5d102453532ad87df1040 to your computer and use it in GitHub Desktop.
Save yurynix/5502915e66c5d102453532ad87df1040 to your computer and use it in GitHub Desktop.
react-velo-blog-post
import React from 'react';
import { render, W } from '@wix/react-velo';
function App() {
const [counter, setCounter] = React.useState(0);
return <>
<W.counter text={`Count: ${counter}`} />
<W.increment label="+Increment" onClick={() => setCounter(counter+1)} />
<W.decrement label="-Decrement" onClick={() => setCounter(counter-1)} />
</>
}
$w.onReady(() => render(App, $w, React));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment