import React<% if (useReactState) { %>, { useState } <% } %> from "react"; import webpackLogo from "../assets/webpack.png"; const App = () => { <% if (useReactState) { %> const [ count, setCount ] = useState(0); const increment = () => setCount(count => count + 1); const decrement = () => setCount(count => count - 1); <% } %> return (
Webpack logo

This is the Home page!

Click the buttons below to increment and decrement the count.

<% if (useReactState) { %>

Count: {count}

<% } %>
); } export default App;