这是一个标题
这是一个副标题
这是一个引用
/** | |
* Get a random id with prefix, it not strictly guarantee id uniqueness | |
* | |
* Note: the return value of getUuid is too long, we need a short one | |
* | |
* @example | |
* getUuidShort({ prefix: 'semi' }) => 'semi-46dinzc' | |
* getUuidShort({ prefix: '' }) => '0eer2i0' | |
* getUuidShort({ prefix: 'semi', length: 4 }) => 'semi-8jts' | |
*/ |
import React, { useState, useRef, useEffect } from "react"; | |
/** | |
* Solution: fix controlled input cursor lossing | |
* https://github.com/facebook/react/issues/955 | |
*/ | |
export default function App() { | |
const inputRef = useRef(); | |
const [value, setValue] = useState("12345678"); | |
const [selection, setSelection] = useState({ |
TypeScript 26 hrs 10 mins ██████████████████▍░░ 87.9% | |
JavaScript 2 hrs 3 mins █▍░░░░░░░░░░░░░░░░░░░ 6.9% | |
Markdown 23 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.3% | |
JSON 23 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.3% | |
SCSS 18 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.0% |