Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ah, I thought “load” was a jQuery plug-in. In that case it’s real code, but it’s only handling the data-fetching; I don’t need React to do that either, but I’d need to generate the hit counter itself (for it to be exactly equivalent, it would need to generate the numbers with SVG as well as add aria labels for screen readers).

The only React-specific thing is the useEffect call, which is essentially comparable to window.onLoad.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: