sweetcola's recent timeline updates
sweetcola

sweetcola

V2EX member #414332, joined on 2019-05-21 15:18:10 +08:00
Per sweetcola's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
sweetcola's recent replies
Jan 8, 2025
Replied to a topic by duanjiong 怀旧游戏 不懂就问,这局扫雷我为啥失败了?
正确的解法是随便点一个
建议 Vue ,因为不熟悉 JavaScript 就学 React 会觉得很困难并且不能理解这些东西为什么要这么写
接触浏览器插件开发后我就卸载了所有不开源的插件,因为能做的实在是太多了,像这种情况 Edge 那边更是个重灾区,包括 Firefox 里也有很多,只能自己小心
Jun 4, 2024
Replied to a topic by zungmou 数学 一道 6-7 年级奥数题
5, 4, 3 两两组合得出 9, 8, 7
9 * 10 + 7 + 3 = 100 得出 23 天
5 和 4 循环刚好超出 100 也是最少也要 23 天(这能算证明吗- -)
@Rache1 谢谢提醒,昨天 battle 完了之后给我加上了,过程的确是你说的那样,京东这样搞是真的恶心,以前积攒的好感给消耗掉了
@wwc625 刚刚遇到这种情况,真是恶心,现在在与客服 battle ,之后买东西如果在意保价的话不觉得会在京东买了
Mar 29, 2024
Replied to a topic by Asuler React 请教一个 react hook 的问题
@Asuler React 是这样的,不愿意这样做那就只能状态和函数一起外移了
Mar 29, 2024
Replied to a topic by Asuler React 请教一个 react hook 的问题
之前在 reactjs/rfcs 看到的 useEvent 就是用来解决这种问题的

```
function useEvent(handler) {
const handlerRef = useRef(null);
useLayoutEffect(() => {
handlerRef.current = handler;
});
return useCallback((...args) => {
const fn = handlerRef.current;
return fn(...args);
}, []);
}
```

或者直接
```
const xxx = useRef();
xxx = () => {};

...

xxx.current();
```
Mar 6, 2024
Replied to a topic by VagrantZ Windows Microsoft is killing off Windows Subsystem for Android
WSA 出来后一直在上面玩 FGO ,虽然非常非常卡但还是能玩,上一个版本更新后是流畅了很多,但这就没了

虽然知道在模拟器上玩更流畅,但起码 WSA 是微软整的,比较放心安装在 PC 上
React 能用 class 也能用 hooks ,但是大部分人都会去拥抱 hooks 的写法就能说明一定问题了,我是 hook 出来的那一开始就把 class 写法抛弃了。

如果用 hooks 写会觉得很乱,那么用 class 来写会更乱,像 #1 说的做好抽象就行了。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   978 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 22:40 · PVG 06:40 · LAX 15:40 · JFK 18:40
♥ Do have faith in what you're doing.