News for hackers. Stuff that matters.
Re:React Router 6 by jjeaff on Thursday November 04, 2021 @12:37PM (#29109308)
Well, it's open source and they aren't going to extinguish JavaScript anytime soon. So I don't see how it would apply here.
Re:React Router 6 by shadowofasun on Friday November 05, 2021 @12:38AM (#29115519)
Microsoft are actively hostile towards JavaScript now. I have been monitoring the progress of vscode's support for JavaScript and noticed that it now clearly a second class citizen. The TypeScript compiler now declares valid and working JavaScript as having errors, and these are displayed to the user in vscode. One example is the usePrevious hook as mentioned on the react website. If you mouse over its signature in vscode, you will see it is undefined -> undefined. This is because useRef() has no argument, and the generic type is inferred from this argument, and JavaScript has no way to do useRef<T>();
Re:React Router 6 by TranquilMarmot on Saturday November 06, 2021 @06:34PM (#29134459)
Turning this off is as easy as flipping a switch in the settings. In the interest of making things easier for beginners (which is a good goal to have) I think it makes sense for type-checking to be enabled in JavaScript files by default.