随笔分类 - react
摘要:src/components/AceMarkdown.tsx: import { useRef, useEffect, useState } from "react"; import { $paper, type Paper } from "../store/paper"; import ace f
阅读全文
摘要:src/components/Counter.tsx: import { useState } from "react"; interface CounterProps { count: number; } export const Counter = ({ count }: CounterProp
阅读全文
摘要:import { StrictMode } from "react"; import { useForm } from "@tanstack/react-form"; import { zodValidator } from "@tanstack/zod-form-adapter"; import
阅读全文
摘要:src/Greeting.tsx: import React from "react"; import r2wc from "@r2wc/react-to-web-component"; type GreetingProps = { name: string; }; const Greeting:
阅读全文
摘要:index.html: <!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>Ariakit</title> </head
阅读全文
摘要:pnpm create vite@latest my-project -- --template react cd my-project pnpm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p tailwind
阅读全文
摘要:xrender是阿里的中后台「表单/表格/图表」开箱即用解决方案。 先采用在线工具创建一个简单的schema:simple.ts export default { "type": "object", "properties": { "title": { "title": "标题", "type":
阅读全文
摘要:pnpm create vite@latest index.html: <!doctype html> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/v
阅读全文
摘要:import { useState } from "react"; import AceEditor from "react-ace"; import "ace-builds/src-noconflict/mode-markdown"; import "ace-builds/src-noconfli
阅读全文
摘要:import { useState } from "react"; import { Flex } from "@radix-ui/themes"; import MDEditor from "@uiw/react-md-editor"; import { getCommands, getExtra
阅读全文
摘要:import { useState } from "react"; import { Button, Flex } from "@radix-ui/themes"; import MarkdownEditor from "@uiw/react-markdown-editor"; export def
阅读全文
摘要:采用了@monaco-editor/react进行编辑,react-markdown预览 import Editor from "@monaco-editor/react"; import { useState } from "react"; import Markdown from "react-
阅读全文
摘要:md-editor-rt是一个react markdown编辑框架。 import { useState } from "react"; import { MdEditor } from "md-editor-rt"; import "md-editor-rt/lib/style.css"; exp
阅读全文
摘要:import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import i18next from "i18next"; import { z } from "zo
阅读全文