HN user

elijahmanor

567 karma
Posts84
Comments24
View on HN
www.youtube.com 3y ago

New Zellij Features: Swap Layouts and Stacked Panes

elijahmanor
2pts0
css-tricks.com 4y ago

Minding the “Gap” via CSS-Tricks

elijahmanor
1pts0
christianheilmann.com 4y ago

CSS Mirror Editing in Edge DevTools for VS Code

elijahmanor
1pts0
lea.verou.me 5y ago

Introspecting CSS via the CSS OM: Getting supported properties, shorthands, etc.

elijahmanor
2pts0
lea.verou.me 6y ago

Import non-ESM libraries in ES Modules, with client-side vanilla JavaScript

elijahmanor
2pts0
daveceddia.com 6y ago

React Hook to Run Code After Render

elijahmanor
2pts2
elijahmanor.com 6y ago

Natively Format JavaScript Dates and Times

elijahmanor
1pts0
2ality.com 6y ago

Eliminating duplicate JavaScript objects: Three approaches

elijahmanor
2pts0
elijahmanor.com 6y ago

Comic Strip: How Do You Comfort a JavaScript Bug?

elijahmanor
1pts0
www.bitnative.com 6y ago

Four Reasons React Renders (and three ways to stop it)

elijahmanor
1pts0
shareon.js.org 6y ago

Shareon – Lightweight, stylish and ethical share buttons

elijahmanor
1pts0
christianheilmann.com 6y ago

Always bet on HTML – being misunderstood

elijahmanor
1pts0
css-tricks.com 6y ago

Three CSS Alternatives to JavaScript Navigation

elijahmanor
6pts0
elijahmanor.com 6y ago

Create a React Teleprompter Using the Web SpeechRecognition API

elijahmanor
2pts0
www.robinwieruch.de 6y ago

How to UseMemo in React

elijahmanor
1pts0
overreacted.io 6y ago

The Wet Codebase

elijahmanor
1pts0
css-tricks.com 6y ago

An Eleventy Starter with Tailwind CSS and Alpine.js

elijahmanor
2pts0
css-tricks.com 6y ago

Frontity Is React for WordPress

elijahmanor
12pts0
www.lorenzweiss.de 6y ago

Five common mistakes writing react components (with hooks) in 2020

elijahmanor
2pts0
joelhooks.com 6y ago

A handy NPM script for creating a new Gatsby blog post

elijahmanor
1pts0
css-tricks.com 6y ago

Striking a Balance Between Native and Custom Select Elements

elijahmanor
1pts0
sarahmhigley.com 6y ago

Quick Tips for High Contrast Mode

elijahmanor
1pts0
www.zachleat.com 6y ago

Use Speedlify to Continuously Measure Site Performance

elijahmanor
1pts0
www.robinwieruch.de 6y ago

How to UseCallback in React

elijahmanor
2pts0
xkcd.com 6y ago

Xkcd: Universal Rating Scale

elijahmanor
2pts0
www.elijahmanor.com 13y ago

Angry Birds of JavaScript: Big Brother Bird - Patterns

elijahmanor
1pts0
www.elijahmanor.com 13y ago

Angry Birds of JavaScript: Green Bird - Mocking

elijahmanor
1pts0
www.elijahmanor.com 13y ago

Angry Birds of JavaScript: White Bird - Linting

elijahmanor
3pts0
www.elijahmanor.com 13y ago

Angry Birds of JavaScript: Black Bird - Backbone

elijahmanor
3pts0
www.elijahmanor.com 13y ago

Angry Birds of JavaScript: Yellow Bird - RequireJS

elijahmanor
4pts0

You are correct in that jQuery doesn't re-query the DOM for elements on each call, but what it does do is re-loop through it's internal cached collection to apply these CSS rules. The perf hit isn't noticeable when jQuery's selection (internal collection) is small. Imagine a webpage with lots of elements you want to select and then want to interact with... that is what I am trying to bring attention to.

Nice point about the object loop. I would image though that the object would have relatively few properties whereas the number of DOM elements in the jQuery collection could vary dramatically based on the UI (think a long list of list items).

TypeScript Modules 14 years ago

I find TypeScript to be an exciting new take on the language. I look forward to using it more this year. Thanks for your post and your PluralSight course

Yeah mockjax is a great library as well. I usually recommend people added mockjax to existing projects, but if it is a new project recommend using amplify.request. The amplify.request piece enables you to do some things you can't easily with mockjax. For example, amplify.request allows you to change the caching strategy in the define statements and not where the request is being made. Also if the data from the server changes you can add a decoder to the define statement to map the data to what your code expects. Or if the data going out changes you can add a dataMap to the define statement to so your main application code doesn't have to change. You can also create a custom request type other than jQuery AJAX (think maybe websockets or Dojo's ajax). I sometimes use mockjax also in a jsFiddle or demo code where I don't want to get into amplify.request and just want to use out of the box jQuery.ajax. Thanks for your comment.

Yeah, my guess is that CoffeeScript took direction from those languages for this feature.

Nice function to convert annotated string to a regex. I wonder if this is being considered in the next versions of JavaScript? Or better yet... native annotation?

I like the CoffeeScript approach since that logic is done at compile time and not when it is being executed.

True, but then you have the overhead of string concatenation... although in the large scheme of things that is probably very small, unless you are doing it in a huge loop, but then you'd cache that RegExp anyway.

Thanks... yeah I'm also working on a selector filter to do partial matches on html5 data attribute names.

So if you have data-mytype & data-mytyphoon you can match both of them with one selector doing a starts with type syntax.

The idea is similar to the attribute selectors native in jQuery. I should be posting it soon.