diff --git a/demo/configuration.ts b/demo/configuration.ts index 32d24d8..5518c1d 100644 --- a/demo/configuration.ts +++ b/demo/configuration.ts @@ -20,7 +20,6 @@ export const rsbuild = defineConfig({ resolve: { alias: { react: 'epic-jsx', - 'react-dom': 'epic-jsx', 'react/jsx-runtime': 'epic-jsx', 'react/jsx-dev-runtime': 'epic-jsx', }, @@ -29,7 +28,14 @@ export const rsbuild = defineConfig({ }, }) -export const gitignore = 'recommended' +export const gitignore = 'bundle' +export const vscode = 'biome' +export const biome = { + extends: 'recommended', + files: { + ignore: ['rsbuild.config.ts'], + }, +} export const typescript = { extends: 'web', diff --git a/demo/index.tsx b/demo/index.tsx index bea53b6..49b364b 100644 --- a/demo/index.tsx +++ b/demo/index.tsx @@ -1,17 +1,36 @@ -import { Page, addPage, back, configure, go, forward } from 'epic-router' +import { render } from 'epic-jsx' +import { Page, addPage, back, configure, forward, go, initial } from 'epic-router' import { connect } from 'epic-state/connect' import { Exmpl } from 'exmpl' -import { render } from 'epic-jsx' +import { About } from './page/About' +import { Article } from './page/Article' +import { Overview } from './page/Overview' // TODO not working with globally registered plugin. // plugin(connect) const { router } = configure<{ id: number }>('overview', undefined, undefined, connect) -const Overview = () => Overview -const About = () => About -const Article = () => Article: {router.parameters.id} -const Nested = () => Nested +// TODO epic-jsx bug, link will not be removed when a Fragment is used here instead of the
Nested Route: "{router.route}"
+ { + event.preventDefault() + initial() + }} + > + Go to Homepage + ++ Uses epic-jsx for rendering. +
This plugin is a router to switch between different pages.
+The parameter for the specific article is stored in the URL!
+This is the homepage!
++ Uses preact for rendering. +