From 21366f84bcc7229dd73804c719dfec27cd82bf00 Mon Sep 17 00:00:00 2001 From: Daryl Castro Date: Sat, 28 Dec 2024 22:42:55 +0100 Subject: [PATCH] fix: format code --- examples/starter/src/index.tsx | 33 ++++++++++++++++++--------------- examples/starter/vite.config.ts | 6 +++--- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/examples/starter/src/index.tsx b/examples/starter/src/index.tsx index 677ebed926..2c23103369 100644 --- a/examples/starter/src/index.tsx +++ b/examples/starter/src/index.tsx @@ -1,34 +1,37 @@ -import { StrictMode } from 'react'; -import { createRoot } from 'react-dom/client'; +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' import { create } from 'zustand' -import mascot from './assets/zustand-mascot.svg'; +import mascot from './assets/zustand-mascot.svg' -import './index.css'; +import './index.css' type Store = { - count: number; - inc: () => void; -}; + count: number + inc: () => void +} const useStore = create((set) => ({ count: 0, inc: () => set((state) => ({ count: state.count + 1 })), -})); +})) const Counter = () => { - const count = useStore((s) => s.count); - const inc = useStore((s) => s.inc); + const count = useStore((s) => s.count) + const inc = useStore((s) => s.inc) return ( <> {count} - - ); -}; + ) +} function App() { return ( @@ -48,11 +51,11 @@ function App() { - ); + ) } createRoot(document.getElementById('root')!).render( , -); +) diff --git a/examples/starter/vite.config.ts b/examples/starter/vite.config.ts index e1b1b76384..5e5b6eef62 100644 --- a/examples/starter/vite.config.ts +++ b/examples/starter/vite.config.ts @@ -1,7 +1,7 @@ -import react from '@vitejs/plugin-react-swc'; -import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react-swc' +import { defineConfig } from 'vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], -}); +})