世界上最伟大的投资就是投资自己的教育
-
hidden={true}
-
为什么不直接用 proxy 呐?
-
interface Resource<T> { uid: number; resouceName: string; data: T; } const docThree: Resource<object> = { uid: 2, resouceName: "person", data: { name: "hello" }, };
如果想给 docThree.data 设置必须包干 age 属性应该怎么操作?
-
还是没明白 useCallback 具体使用场景
-
export default function BlogList({ blogs, title='All Blogs'}) { return ( <div className="blog-list"> <h2>{title}</h2> {blogs.map((blog) => ( <div className='blog-preview' key={blog.id}> <h2>{blog.title}</h2> <p>Written by {blog.author}</p> </div> ))} </div> ) }
这样写是不是和 defaultProps 一样?
-
const EventEmitter = require('events');
class MyEmitter extends EventEmitter {}const fun1= new MyEmitter();
const fun2= new MyEmitter();
const fun3= new MyEmitter();let arr = [fun1,fun2,fun3];
arr.forEach((item)=>{
item.on('event', msg => {
console.log(msg);
});
})
fun1.emit('event','fun1');
fun2.emit('event','fun2');
fun3.emit('event','fun3');
© 汕尾市求知科技有限公司 | Rails365 Gitlab | 知乎 | b 站 | csdn
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top