javascript - reduce
array.reduce(function(total, currentValue, _currentIndex, _arrary), _initialValue)
React - 状态变化的时机
const [state, setState] = useState(initialState)
setState
可能是个异步函数。
Json Server
npx json-server --port 3001 --watch db.json
db.json
的键名会变成 API 的路径。
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn