# Wouter Example

```ts
import { Link, Route, Router, Switch } from "wouter";

function App() {
 return (
  <div>
   <Router base="/app">
    <Switch>
     <Route path="/">Home</Route>
     <Route path="/user" nest>
      <Route path="/">User</Route>
      <Route path="/:username">
       {(params) => {
        console.log(params);
        return <div>User Txt: {JSON.stringify(params)}</div>;
       }}
      </Route>
     </Route>
    </Switch>
    <br />
    {/* ----- */}
    <Link className="btn btn-neutral" href="/">
     Home
    </Link>
    <Link className="btn btn-neutral" href="/user">
     User
    </Link>
    <Link className="btn btn-neutral" href="/user/USERNAME">
     User Txt
    </Link>
   </Router>
  </div>
 );
}

export default App;
```
