5 ms·
Agreed, but it's so rare nowadays though. I still remember when I saw a junior frontend dev struggling to get some element to look differently when hovered in R
by yoavm 3y ago
Agreed, but it's so rare nowadays though. I still remember when I saw a junior frontend dev struggling to get some element to look differently when hovered in React. They went though loops and hoops to style it using CSS-in-JS and mousemove, only because they didn't hear about :hover.
- revskill 3y agoThen what ? That junior dev could produce working software, and fix the css issue later (if needed). Give that "senior CSS developer" a day and figure out how to manage state, then what you get is a crap.
- nicoburns 3y agoThe problem is that if the end state you want is a clean codebase implementing your use case, that’s also easy to modify and extend, then the mess such a developer will produce is a much worse starting point than starting from scratch.
- gibbitz 3y agoBusiness doesn't fund "fix it later" -- it just becomes tech debt. You have to push to do it right the first time or approve merges you can live with in perpetuity.
- sfn42 3y agoYeah that's gonna work out great when the entire app is built using weird overcomplicated solutions to simple problems, let's just clean it all up later! Doesn't matter how you write your code as long as it seems to work, well deal with all the bugs we discover later! The proper way to do it is to do code reviews and teach newbies how to do things like this. Ideally they should have asked about it(or just googled) before the review. I think "well just fix it later if needed" is asking for trouble and you're basically just writing legacy code.
- gedy 3y agoMy favorite experience with Bootcamp folks was someone who came in do an interview, and she could talk, was professional, had nice looking blogs, etc. and seemed really awesome on paper. However, I had her do a really simple React exercise, and she was producing some really strange code like using Ruby inside of a JavaScript onClick handler? lol I think a failing of a lot of these bootcamps is they encourage people to present themselves as more experienced than they actually are. I don’t mind someone who’s starting out, and has a lot of potential, but please be honest about your skill level, as it just disappoints the interviewer and misrepresents you.
- nicoburns 3y agoI think this is an unfortunate side effect of boot camps trying to impart best practices on their students. They don’t really have time to learn and apply the actual practice well, but the names stick with them.
- teg4n_ 3y agoSeems like just lack of experience. You can even do it simply with JS with onHoverIn / onHoverOut
- deleted 3y ago[deleted]
- graypegg 3y agoWhile that's possible, it's a lot more fault tolerant to use the declarative :hover rule, than it is to handle it procedurally. The browser knows how to handle odd pointing devices, touch states and won't ever have to deal with uncaught errors in a mouseover/mouseout event.
- teg4n_ 3y agofor sure, was just an example that there are apis, that could have been reached for even without CSS knowledge that would make it easier than trying to get the position of the mouse on the screen, the position of the target element and if they overlap
- Timon3 3y agoThere is no onHoverIn or onHoverOut in JS.
- teg4n_ 3y agoyeah sorry that’s the react-native equivalent. you could use mouseenter / mouseleave events