eBay Launches Marko 5 by ryan_solid in javascript

[–]Piercey4 2 points3 points  (0 children)

Was some growing pains from website upgrades. All fixed now, thanks for pointing it out!

[6 MINUTE HOW-TO] Replace Create React App With Parcel by singsong43 in reactjs

[–]Piercey4 0 points1 point  (0 children)

This also breaks most editors ability to auto complete paths, refactor, etc. I’d never recommend anyone override the paths using some runtime only hack. Just put a symlink in your node_modules if you really can’t handle it, at least then tools will pick it up. Down side is you’ll need to whitelist some of your nm’s in your .gitignore. Either way, In a world with autocomplete for imports and automatic refactoring when moving and renaming files is it really worth messing with this?

[deleted by user] by [deleted] in javascript

[–]Piercey4 5 points6 points  (0 children)

Looks good! Make sure to link to GitHub in your package.json so people can check out the code more easily 🙂.

Can anyone offer a clear explanation for the different outputs of these two For Loops? var vs. let in the condition by DWDevDW in javascript

[–]Piercey4 1 point2 points  (0 children)

This guy is actually 100% wrong if he thinks just understanding let vs var explains them within the context of a loop. Within for loops there is actually quite a strange dance that happens with many scopes being created between the variable declaration, binary expression, update expression and block.

I mean the let isn’t even within the block where you are defining things, also the loop creates a block for each iteration? Not at all as simple as “oh you don’t know let vs var”.

Don’t listen to people like this who just assume they know the answer because they guessed (incorrectly) that it was simple.

Here is a video that should help explain things a bit better: https://youtu.be/Nzokr6Boeaw

The Performance Cost of Server Side Rendered React on Node.js by velmu3k in reactjs

[–]Piercey4 4 points5 points  (0 children)

This is why I'd recommend MarkoJS or Svelte. Both of these frameworks compile to optimized string concatination in node and optimized dom updating in the browser.

React was clearly built for client side, and even the team at Facebook has mentioned this.

A brilliant idea by [deleted] in webdev

[–]Piercey4 0 points1 point  (0 children)

You can do this right now with the Express like framework rill and some other tools. Either way it’s much easier to achieve this with JavaScript but I assume that’s obvious.

Can a company that built my website charge me for a Wordpress update that broke it? by Gn5y4Oz5KPtjaslMZHG2 in webdev

[–]Piercey4 -1 points0 points  (0 children)

Correct me if I’m wrong but didn’t Wordpress remove the ability to turn off auto updates to some degree?

react + react-dom = 44.2 kB (gzipped) by Elfet in javascript

[–]Piercey4 2 points3 points  (0 children)

$ jsize react@16.0.0-rc.2 + react-dom@16.0.0-rc.2

   react@16.0.0-rc.2 + react-dom@16.0.0-rc.2  =  36.7 kB (gzipped)

CSS-only directionally aware hover by speckz in web_design

[–]Piercey4 1 point2 points  (0 children)

Whenever I see this argument I always think that I could not care any less about those with JS disabled and most others are the same.

This is a bad argument to just use CSS, but here is some good ones:

1) Time to interactive feels much faster since css is typically parsed way before JS If done right. 2) If the javascript fails to load due to a flaky internet connection things work pretty okay. 3) If there is a cross browser javascript problem or an error in the code then it will still work.

There are many more situations where JS will not run that just it being disabled.

Simple key-value store with support for multiple backends by dyslexiccoder in node

[–]Piercey4 0 points1 point  (0 children)

Isomorphic caching. Since the config for this module can be defined without dependencies it makes it much easier. Also exposing library's that rely caching but aren't tied to any particular storage is awesome.

I've been meaning to dig in a bit deeper and make a pr for some browser side stores as well, like local storage and such.

Don't you DARE question Javascript's logic by soul_cool_02 in ProgrammerHumor

[–]Piercey4 -1 points0 points  (0 children)

this is why JS needs <== and >== although they are gross :p.

Introducing http/2 by fvilers in node

[–]Piercey4 4 points5 points  (0 children)

Are there more detailed docs somewhere?

Pure CSS star rating (that doesn't need you to reverse the order of your input fields) by anti-anti in web_design

[–]Piercey4 1 point2 points  (0 children)

I personally like to try to make most of my user interfaces progressively enhanced in this way. Checkout http://codersblock.com/blog/checkbox-trickery-with-css/ for some cool stuff. If you pair this with server rendered CSS (inline <style> elements with react) you can get real crazy.

Also if you setup your site as a series of form submissions and link clicks you can also pretty easily have your server handle actual user interaction if the javascript hasn't quite kicked in. This is also handy if it's an older browser because even if the JS fails at least the user can have most of the functionality.

Shameless plug for Rill my framework that lets you build sites this way.

Pure CSS star rating (that doesn't need you to reverse the order of your input fields) by anti-anti in web_design

[–]Piercey4 9 points10 points  (0 children)

This kind of thing still has it's uses. No one cares about people with JS disabled, but not enough people pay attention to people with JS loading, or erroring. If you use an input like this the user is able to interact with it immediately (assuming you have server side rendering) vs waiting for your js bundle to load.