Last active
July 19, 2022 11:01
-
-
Save yurynix/5502915e66c5d102453532ad87df1040 to your computer and use it in GitHub Desktop.
react-velo-blog-post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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