3 ms·
Small piece of advice you should be debouncing your primary input at the very least, especially because you insert an entry into the browser history for every
by vinnymac 1y ago
Small piece of advice you should be debouncing your primary input at the very least, especially because you insert an entry into the browser history for every character typed (consider only doing that on submit). Plus if any calls are made to the network in response to a key press you’d add unnecessary pressure.
Presently trying to navigate back to the comments from your site after typing out a domain required far more effort than navigating backward a couple times.
- sim04ful 1y agoI'll fix that thanks
- sim04ful 1y agoFixed: instead of debouncing, i'm using location.hash, no network requests since hash arguments are ignored in urls. I can't believe I was making a network request per keystroke, textbook example.
- kinduff 1y agoHeads up that hashes cannot be read from the server.