ITADN

Fast Refresh warning

#38Closedopenscript 创建于 2024-10-18
O
openscriptcommented
I'm using version 0.12.2 and followed the README. ```tsx import { Button, Container, Paper, PasswordInput, TextInput, Title } from "@quassel/ui"; import { createFileRoute } from "@tanstack/react-router"; import { i18n } from "../stores/i18n"; import { useStore } from "@nanostores/react"; export const messages = i18n("sessionRoute", { title: "Sign in", emailLabel: "Email", emailPlaceholder: "fraenzy.tobler@example.ch", }); export const Route = createFileRoute("/session")({ component: () => { const t = useStore(messages); return ( <Container size={420} my={40}> <Title ta="center">{t.title}</Title> <Paper withBorder shadow="md" p={30} mt={30} radius="md"> <TextInput label={t.emailLabel} placeholder={t.emailPlaceholder} required /> <PasswordInput label="Password" placeholder="Your password" required mt="md" /> <Button fullWidth mt="xl"> Sign in </Button> </Paper> </Container> ); }, }); ``` When HMR is active I get the following warning: ``` [vite] hmr invalidate /src/routes/session.tsx Could not Fast Refresh ("messages" export is incompatible). Learn more at https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports ``` How to address this issue?
关闭于 2024-10-18 8 条评论