Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Jan 19, 2024
2 parents c105c62 + 154062b commit 07fa87c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
12 changes: 10 additions & 2 deletions dev/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { JSX, Show, createEffect, lazy } from 'solid-js'
import { A, Outlet, Route, Router, useLocation, useMatch, useNavigate, useSearchParams } from '../src'
import {
A,
Outlet,
Route,
Router,
useLocation,
useMatch,
useNavigate,
useSearchParams,
} from '../src'
const AppPage = lazy(() => import('./AppPage'))

const Root = () => {
const [searchParams, setSearchParams] = useSearchParams()
const location = useLocation()
const navigate = useNavigate()
const match = useMatch(() => '/app/')


// setInterval(() => {
// // setSearchParams({ id: Math.random().toString() })
Expand Down
7 changes: 3 additions & 4 deletions dev/AppPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Outlet } from "../src";
import { Outlet } from '../src'

const AppPage = () => {

console.log("mounted")
console.log('mounted')
const pageStyles = {
display: 'flex',
height: '100%',
Expand All @@ -27,4 +26,4 @@ const AppPage = () => {
)
}

export default AppPage;
export default AppPage
4 changes: 2 additions & 2 deletions src/Outlet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export const Outlet = (props: { children?: string; name?: string }) => {
}
return component
})

const MemodComponent = createMemo(() => {
return component()()
})
})

return <>{MemodComponent}</>
}

0 comments on commit 07fa87c

Please sign in to comment.