chore: version preact explicitly in import map (#258)

This allows users to control the `preact` version independently of fresh
itself.
This commit is contained in:
Luca Casonato
2022-06-20 12:37:24 +02:00
committed by GitHub
parent 3e001fe242
commit cbbf616a74
55 changed files with 108 additions and 125 deletions
+3 -2
View File
@@ -31,7 +31,8 @@ Here is an example of an island component that counts down to a specific time.
// islands/Countdown.tsx
/** @jsx h */
import { h, useEffect, useState } from "$fresh/runtime.ts";
import { h } from "preact";
import { useEffect, useState } from "preact/hooks";
const timeFmt = new Intl.RelativeTimeFormat("en-US");
@@ -73,7 +74,7 @@ client with the correct props:
// routes/countdown.tsx
/** @jsx h */
import { h } from "$fresh/runtime.ts";
import { h } from "preact";
import Countdown from "../islands/Countdown.tsx";
export default function Page() {