博文

目前显示的是 二月 12, 2025的博文

Scripting News: Wednesday, February 12, 2025

Wednesday, February 12, 2025 The United States is not a Silicon Valley company # I've had an experience few people have had, and it's relevant to the way all of us feel right now. The experience: Being part of a Silicon Valley company that was acquired by another Silicon Valley company. I was the CEO. # I recognize the feeling, because Musk is acting as if he is the acquirer of a Silicon Valley company, and the company he has acquired in the USA. Or so he thinks. But the United States is not a Silicon Valley company where, you have departments and managers at every level, and each level must follow orders from the level above them. It doesn't work that way here. Deliberately. Very deliberately. # There never has been a Silicon Valley company that gives each employee the rights and responsibilities of an American citizen. We don't take orders except in very exceptional circumstances, and then with all the rights guaranteed by the Consti...

🔥 (#204) Forcing a component to update, dynamic returns, and more

图片
Read this on my blog Hey all! This weeks podcast episode was fun, because I was interviewed by my friend Alex Lichter (next week's episode is the other way around). I've also been working hard on the big update for Mastering Nuxt! I've been sharing some updates on my social media, so you can follow along there if you'd like. — Michael 🔥 Forcing a Component to Update What do you do if a component isn't updating the way it should? Likely, this is caused by a misunderstanding and misuse of the reactivity system. But let's look at a quick solution using forceUpdate : import { getCurrentInstance } from 'vue' ; const methodThatForcesUpdate = () => { // ... const instance = getCurrentInstance (); instance . proxy . forceUpdate (); // ... }; This getCurrentInstance is actually an undocumented part of Vue (it was removed from the docs) and is not recommended — the better solution i...