rzh9b
rzh9b2y ago

react-notion-x usememo error?

i'm using react-notion-x, following the get started prompt and frankly i'm not sure what's wrong. useMemo is a hook, but i'm not sure what i can do differently to make it not produce this error
1 Reply
rzh9b
rzh9bOP2y ago
import { Head } from "$fresh/runtime.ts";
import Counter from "../islands/Counter.tsx";

import "https://deno.land/std@0.170.0/dotenv/load.ts";

import * as React from "preact";

import { NotionAPI } from "https://esm.sh/notion-client@6.15.6";
import { NotionRenderer } from "https://esm.sh/react-notion-x@6.15.7";

const notion = new NotionAPI();

const recordMap = await notion.getPage("f675efad218a4aea85546c036957f3f8");

export default function Home() {
return (
<NotionRenderer recordMap={recordMap} fullPage={true} darkMode={true} />
);
}
import { Head } from "$fresh/runtime.ts";
import Counter from "../islands/Counter.tsx";

import "https://deno.land/std@0.170.0/dotenv/load.ts";

import * as React from "preact";

import { NotionAPI } from "https://esm.sh/notion-client@6.15.6";
import { NotionRenderer } from "https://esm.sh/react-notion-x@6.15.7";

const notion = new NotionAPI();

const recordMap = await notion.getPage("f675efad218a4aea85546c036957f3f8");

export default function Home() {
return (
<NotionRenderer recordMap={recordMap} fullPage={true} darkMode={true} />
);
}
here's my fresh page