UNPKG

wordpress-plugin

Version:

Boilerplate WordPress Plugin structure to support development of JavaScript frameworks: React, Vue, Vanilla, TypeScript, supporting Vite, NextJS, Nuxt, Gatsby, and JSX/TSX Components (like MUI), CSS (like Tailwind + Unity), data APIs (like REST and GraphQ

33 lines (30 loc) 861 B
import { useState } from 'preact/hooks' import preactLogo from './assets/preact.svg' import './app.css' export function App() { const [count, setCount] = useState(0) return ( <> <div> <a href="https://vitejs.dev" target="_blank"> <img src="/vite.svg" class="logo" alt="Vite logo" /> </a> <a href="https://preactjs.com" target="_blank"> <img src={preactLogo} class="logo preact" alt="Preact logo" /> </a> </div> <h1>Vite + Preact</h1> <div class="card"> <button onClick={() => setCount((count) => count + 1)}> count is {count} </button> <p> Edit <code>src/app.jsx</code> and save to test HMR </p> </div> <p class="read-the-docs"> Click on the Vite and Preact logos to learn more </p> </> ) }