yacc: command not found
sudo apt install bison
sudo apt install bison
sudo apt install autoconf automake
重新换了一个ubuntu的时候,编译浏览器遇到了 gmo not found 问题
cannot stat 't-**.gmo' : No such file or directory
解决问题
sudo apt install gettext
https://daisyui.com daisyUI — Tailwind CSS Components WebdaisyUI is a plugin for Tailwind CSS. It works on all JS frameworks and doesn't need a JS bundle file. Install daisyUI as a dev dependency and use the class names just like any …
https://chakra-ui.com Chakra UI - A simple, modular and accessible component … WebCreate accessible React apps. with speed. Chakra UI is a simple, modular and accessible component library that gives you the building blocks you need to build your React applications.
react-icons.github.io https://react-icons.github.io/react-icons React Icons - GitHub Pages WebReact Icons. Include popular icons in your React projects easily with react-icons, which utilizes ES6 imports that allows you to include only the icons that your project is using. …
Over 4850 pixel-perfect icons for web design Free and open source icons designed to make your website or app attractive, visually consistent and simply beautiful.
GitHub Pages https://immerjs.github.io › immer Immer (German for: always) is a tiny package that allows you to work with immutable state in a more convenient way. React & Immer · Using produce · Supporting immer · Installation
https://zhuanlan.zhihu.com/p/639089491
3.1 使用produce函数 produce函数是use-immer库中最重要的函数之一。它可以帮助我们更加方便地管理和更新JavaScript对象和数组。下面是一个简单的例子:
import { produce } from 'immer';
const state = {
todos: [
{ id: 1, text: 'Learn React', completed: true },
{ id: 2, text: 'Learn use-immer', completed: false },
],
};
const nextState = produce(state, draftState => {
draftState.todos.push({ id: 3, text: 'Learn Redux', completed: false });
});
console.log(nextState.todos);
在上面的例子中,我们使用了produce函数来更新state中的todos数组。我们可以看到,使用produce函数可以帮助我们更加方便地更新JavaScript对象和数组。
a quick way to create a code template for a component or etc...
rcc
ref is a reference to a element but ref maybe null
const obj = {
className: "none",
size: 14,
color: "red"
}
<Comp
{ ... obj }
/>
equals
<Comp
className={obj.className}
size={obj.size}
color={obj.color}
/>
... means loop the obj and set each key to the value
import { z } from 'zod';
// create the limites
const schema = z.object({
name: z.string().min(3, {"message":"at least 3 characters."}),
age: z.number({invalid_type_error:"required"}).min(18) // the api shoud be mobile and ...
})
// create the interface for data
type FormData = Formz.infer<typeof schema>;
const {
register,
handleSubmit,
formState: {errors,isValid}
} =
useForm<FormData>( { resolver: zodResolver(schema) } );
useEffect is similar to a "OnRendered" Callback when JSX modules is rendered then react call this function
the finally method will be called both succeed or failed when fetch on axios
seemly to swift syntax
Mozilla Developer https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal AbortSignal - Web APIs | MDN WebAug 4, 2023 · English (US) AbortSignal. The AbortSignal interface represents a signal object that allows you to communicate with a DOM request (such as a fetch request) and abort it …
const controller = new AbortController();
const signal = controller.signal;
const url = "video.mp4";
const downloadBtn = document.querySelector(".download");
const abortBtn = document.querySelector(".abort");
downloadBtn.addEventListener("click", fetchVideo);
abortBtn.addEventListener("click", () => {
controller.abort();
console.log("Download aborted");
});
function fetchVideo() {
fetch(url, { signal })
.then((response) => {
console.log("Download complete", response);
})
.catch((err) => {
console.error(`Download error: ${err.message}`);
});
}
Mozilla Developer https://developer.mozilla.org/.../Array/Reduce Array.prototype.reduce() - JavaScript | MDN - MDN Web … WebSep 14, 2023 · Array.prototype.reduce () Try it. The reducer walks through the array element-by-element, at each step adding the current array value to the... Syntax.
WebThe filter () method creates a new array filled with elements that pass a test provided by a function. The filter () method does not execute the function for empty elements.
随着智能化在生活的方方面面深入,家电设备上的智能化需求也是在不断增长。 同时伴随着芯片行业的飞速发展、芯片的国产化进程不断推进,在家用电器上内嵌一块显示屏、并且提供智能化的设备服务已经成为一个行业趋势。
最近回复