Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ziga-miklic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
ziga-miklic
4y ago
I completely agree. stopPropagation() should be used only as a last resort. I have removed a lot of unneeded use cases with this task, but because of the size of our codebase, many still remain. But at least now they include a comment as to
2.
▲
Why, oh why was this added?
(zigamiklic.com)
102 points
by
ziga-miklic
4y ago
|
70 comments
3.
▲
by
ziga-miklic
6y ago
The author here: Thank you for reading my post. I think it is a valid use case as this is a React application and the inlined image is inside JSX. It is also a part of the main app file. So when the user goes offline, the function with the
4.
▲
by
ziga-miklic
6y ago
That was such a great read. Thank you both for sharing!
5.
▲
by
ziga-miklic
6y ago
The author here: I agree with @Gupie, having unit tests ensures that you have correctly refactored the code and have not introduced new bugs. Checking the unit tests can also help you better understand what problems the code is solving and
6.
▲
by
ziga-miklic
6y ago
The author here: Thank you for reading my post! You are correct - I should have. I missed adding a comment when creating the commits, but did include it in my recommendations in the paragraph just below the one you quoted: > ...if there
7.
▲
by
ziga-miklic
6y ago
The author here: I completely agree! When I wrote the post I did come to the same conclusion. I recommended adding a comment or changing the naming to make the inline image obvious, but I missed it when I committed the changes. So I definit
8.
▲
A Short Cautionary Tale About Refactoring
(zigamiklic.com)
45 points
by
ziga-miklic
6y ago
|
41 comments