Hacker News new | ask | show | jobs
by lloydatkinson 788 days ago
Another "I hate hooks" sentiment. Nothing new, or unlike countless other takes online.
2 comments

Post and comments have to be unique or unheard of, otherwise the can't be made or are invalid. What???
just from pure api perspective how is setA, setB, setC better than...

this.setState({this.state: val})

which was already pushing limit of normal behavior which is

state.A = val

just to be revise

i went from having to do

state.onlineStatus = 'active'

to

const [onlineStatus, setOnlineStatus] = useState('active')

Instead of being able to get autocomplete and normal refactoring you would get from plain js.. now you need to add typescript to supplement the mess...

const obj = {

onlineStatus: 'inactive', shoppingCart: '3899x', lastActive: 1834393939 }

obj. [autocomplete anywhere in the project]

vs MORE Boilerplate