Search
Get a React Component by DOM Node
15.5.2018
Retrieving a React component’s DOM node is fairly simple from within the component itself, but what if you want to work backward: retrieve a component’s instance by DOM node? This is a task that the old Dojo Toolkit’s Dijit framework allowed with the dojo.byId method, so it made...
How to Get a React Component’s Element
14.5.2018
JSX is an amazing pseudo-language for React, and if I’m honest, it’s what brought me to love React so much. Using React without JSX is cumbersome and frustrating, while using JSX is such an easier way to express your code. One drawback of JSX, however, is that it makes accessing...
What’s wrong with CSS-in-JS?
11.5.2018
Brad Frost thinks it's:
Lack of portability
Context Switching
Flushing best practices down the toilet
In the spirit of good-ol-fashioned blog-and-response, here's:
Brain Muenzenmeyer's response
Micah Godbolt's response
I'd like to point out that "CSS-in-JS" is an umbrella term, and that there...
Vertically Centering with Flexbox
8.5.2018
Vertically centering sibling child contents is a task we’ve long needed on the web but has always seemed way more difficult than it should be. We initially used tables to accomplish the task, then moved on to CSS and JavaScript tricks because table layout was horribly inefficient —...
React and autofocus
7.5.2018
While I love ReactJS, I can say that I sometimes find interactions that were easy during the pre-ReactJS are annoyingly difficult or at least “indirect”. One example is properly ensuring that a given <input> element gets focused when a button in a different component...
Analýza sentimentu - databáze českých slov s polaritou (AFINN.CZ]
6.5.2018
Pro několik experimentů jsem potřeboval dostatečně rozsáhlý soubor českých slov pro vyjádření sentimentu mluvčího v psaném textu. Na internetu se lze dopátrat podobných databází, nevyhovovaly ale svým poměrně malým rozsahem, nebo kvalitou klasifikace jednotlivých slov. Po několika pokusech...
Script & Style Show: Episode 9: What’s in the News
4.5.2018
In this episode: David reveals his tree-falling-into-house nightmare, but quickly moves onto recent news, like the massive release of Dojo 2, EU privacy, service workers landing in all major browsers (finally Edge!), this tweet, and more!  
The post Script & Style Show: Episode...
IP Geolocation with ipstack (Sponsored)
2.5.2018
Knowing where your web visitor is located is an incredible advantage to any website; you can show relative content like maps, pricing, and availability, output your content in their likely language, etc — I cannot overstate how useful that information is. Of course we have the HTML5...
Change Python Version
1.5.2018
Python plays a major role at Mozilla; much of our website backends and tooling are written in the powerful language. Want to build Firefox? You’ll need to make sure you have the proper Python version, which I recently found out had been upgraded. Despite installing and verifying I had...
Practical Jokes in the Browser
28.4.2018
I know April Fool’s Day is at the beginning of this month, but hey, now you’ve got a year to prepare. Not to mention a gool ol’ practical joke can be done anytime.
Fair warning on this stuff… you gotta be tasteful. Putting someone’s stapler in the jello is pretty hilarious unless it’s somehow...
Understanding React `setState`
25.4.2018
React components can, and often do, have state. State can be anything, but think of things like whether a user is logged in or not and displaying the correct username based on which account is active. Or an array of blog posts. Or if a modal is open or not and which tab within it is active.
React...
Reset File Changes with git
25.4.2018
There are many different philosophies when it comes to code review but mine is fairly simple: I like receiving early “work in progress” patches, I like to be positive in my code review messages, and if a patch is 90% there, I like to finish the patch myself so the project...
DDoS Protection by Incapsula (Sponsored)
24.4.2018
DDoS protection is an incredibly important protection for sites that require dependability, regardless of the service your site provides. Whether your online product or service is for managing money, buying or selling crypto, or simply sharing your tech nerdery (like this blog), there’s...
Programovací paradigmata
24.4.2018
Víte, co to jsou programovací paradigmata? Budu mít tří programátory s různou úrovní znalostí. Zadám jim stejný úkol. Tento úkol bude spočívat ve vytvoření programu pro sečtení celočíselné řady, která se nachází v textovém souboru. Programátoři jsou různě zkušení, a proto každý zvolí odlišný přístup
Script & Style Show: Episode 8: Conferences
22.4.2018
On this episode: David turns carmudgeon when it comes to conferences. The crew talks about different conferences, pitfalls of going to a conference, and most importantly, how to be successful at a conference. Enjoy!
The post Script & Style Show: Episode 8: Conferences appeared first...
Krátce o mně a o mém blogu
18.4.2018
Jmenuji se Petr Suchý. Je mi (now.year – 1986) let. Jinak řečeno, právě teď je mi 32 let. Pocházím ze západních Čech. Konkrétně z města Sokolov, kde bydlím i v současné době. Přestože tématické zaměření tohoto blogu, může vypovídat o něčem jiném, nejsem žádný IT technik. Já jsem...
Creating Spacers with Flexbox
18.4.2018
I was one of the biggest fans of flexbox before it hit but, due to being shuffled around at Mozilla, I never had the chance to use it in any practice project; thus, flexbox still seems like a bit of a mystery to me. This greatly pains me because I feel left out of the […]
The post Creating...
Script & Style Show: Episode 7: Open Source with Ashley Grant
14.4.2018
On this week’s episode we welcome Ashley Grant of Aurelia fame to talk about open source: the good, the bad, the ugly, and the scary. Enjoy!
The post Script & Style Show: Episode 7: Open Source with Ashley Grant appeared first on David Walsh Blog
The Dark Side of Promises
9.4.2018
Since the release of es6 many new features have found their way into NodeJS, but non had quite the same impact as promises. Promises have been developed for the browser before es6 was even a thing. There were several implementations that have been used like jQuery’s deferred object before...
Script & Style Show: Episode 6: Debugging with Jason Laster
7.4.2018
On this week’s episode: we welcome my colleague Jason Laster from Mozilla to speak about the Firefox DevTools debugger. We talk debugging, console shame, the future of JavaScript debuggers, and more! Have ideas for the next episode? Comment below!
The post Script & Style Show: Episode...