-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I'm trying to put together a simple todo app with Deno and am running into an issue where calling crytpoRandomString causes the page to crash without outputting any meaningful error.
The code:
// ..
import { cryptoRandomString } from "https://deno.land/x/[email protected]/mod.ts";
type Props = React.ComponentProps<typeof useDeno>;
type Task = {
id: string;
data: string;
};
export default function Home<Props>() {
const [tasks, setTasks] = useState([] as Task[]);
const [task, setTask] = useState("");
const handleAddTask = (e: any) => {
const newTask: Task = {
id: cryptoRandomString({
length: 16,
type: "abc",
}),
data: task,
};
setTasks([...tasks, newTask]);
setTask("");
};
// ..
return (
// ..
<button onClick={handleAddTask}>Add Task</button>
// ..
);
}I'm not quite sure why this is happening, but aleph isn't erroring out at the commandline, so this must be some issue with the crypto-random-string lib.
Metadata
Metadata
Assignees
Labels
No labels