Content pfp
Content
@
0 reply
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Svelte’s ecosystem is huge because it’s trivial to adapt vanilla JavaScript things. (It’s about to become even easier when Svelte 5 drops this April!) In React, everything has to be wrapped or rewritten in terms of React providers and hooks – it’s practically a different programming language.
5 replies
0 recast
10 reactions

typeof.eth đŸ”” pfp
typeof.eth đŸ””
@typeof.eth
Ugh, I don't wanna be the guy that is just constantly defending React (it's not that great, tbh), but _everything_? I'm using vanilla viem in a React project. Plus all the other go-to libs like lodash, zod, etc. > it’s practically a different programming language React has a learning curve, but it's really just JS.
2 replies
0 recast
1 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Fair – I should clarify I mean “everything” that gets consumed at the component level. At some point or another, any JavaScript reference used for component state has to be adapted to follow the laws of React hooks. Everything up until that point or outside the component realm is indeed just vanilla JS 😄
2 replies
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
React hooks are where React becomes a different programming language. The usual JavaScript conventions around mutability, closures and scoping are completely thrown out the door because a render function has to run over and over. I can’t tell at a glance which JavaScript references persist across renders.
0 reply
0 recast
1 reaction

typeof.eth đŸ”” pfp
typeof.eth đŸ””
@typeof.eth
We just went from implying you can't use vanilla JS libs in React and that it's so different from anything else that it's basically not JS, to: If you need to use the state hook, you have to use hooks. React's state management and lifecycle method handling is not as good as other frameworks. You could just say that.
1 reply
0 recast
1 reaction