JavaScript Icon

JavaScript

JavaScript is an object-oriented programming language used alongside HTML and CSS to give functionality to web pages.
677 Stories
All Topics

JavaScript jrsinclair.com

Elegant error handling with the JavaScript Either monad

This is an absolute mindbender if you’re not already deeply in the functional world, but this post by James Sinclair is also a readable & fascinating look at how to incrementally move from a try/catch error management approach to a fully functional approach. In this article, we’ll assume you already know about function composition and currying. If you need a minute to brush up on those, that’s totally OK. And a word of warning. If you haven’t come across things like monads before, they might seem really… different. Working with tools like these takes a mind shift. And that can be hard work to start with.

read more

Amila Welihinda amilajack.com

compat-db determines the browser compatibility of ALL browser APIs

This tool aims to go above & beyond what MDN and caniuse have accomplished by automating the generation of the compatibility tables for others to use. Access to the output is programmatic, which scales to more developers via tooling such as static analyzers. Click through for a deep-dive on how it works (spoiler: browserstack is involved) and how Amila optimized its required test executions by 95%.

read more

JS Party JS Party #75

LIVE at ReactJS Girls

Emma Wedekind MC’d a live show at ReactJS Girls with a panel of 3 amazing women — Eve Porcello, Marcy Sutton, and Kate Beard. It was a great discussion covering the biggest challenges they’ve faced, how no matter who you are imposter syndrome occurs and never really goes away, ways to support and encourage under-represented groups and people to get into tech, and how to choose a topic when writing a talk.

read more

React github.com

200 bytes to never think about React state management libraries ever again

Gotta love when a library is so small that Logbot can JIT inline it in the News and save us precious clicks… import React from "react" export interface ContainerProviderProps { children: React.ReactNode } export interface Container<Value> { Provider: React.ComponentType<ContainerProviderProps> useContainer: () => Value } export function createContainer<Value>(useHook: () => Value): Container<Value> { let Context = React.createContext<Value | null>(null) function Provider(props: ContainerProviderProps) { let value = useHook() return <Context.Provider value={value}>{props.children}</Context.Provider> } function useContainer(): Value { let value = React.useContext(Context) if (value === null) { throw new Error("Component must be wrapped with <Container.Provider>") } return value } return { Provider, useContainer } } export function useContainer<Value>(container: Container<Value>): Value { return container.useContainer() }

read more

JS Party JS Party #74

When in doubt, log an issue

Nick and Mikeal catch up with Henry Zhu, the maintainer of Babel and host of the Maintainers Anonymous and Hope in Source podcasts. We discuss his path to open source maintainer-ship. We also chat about best practices for interacting with maintainers, while remembering that people are behind open source, and we talk self-care and avoiding burnout, culminating in a self-care repo being created to gather and discuss tips to care for yourself.

read more

Iain Reid github.com

Drowsy - The laziest REST client you'll ever see

This is the perfect tool for any prototype project or proof-of-concept application needing to integrate quickly with RESTful APIs, but it’s also ideally suited as a convenience tool in larger projects that too rely on RESTful interfaces. Just hand Drowsy a hostname for the API to consume and you’re off to the races. Just look how easy it is to get started with the Gists API: const github = drowsy(request, "https://api.github.com/"); github.getGists({ headers: { "User-Agent": "Octo-app" } });

read more

Electron electronjs.org

Electron 5.0.0 has been announced

Find out what’s new and what’s next with Electron. Much of Electron’s functionality is provided by the core components of Chromium, Node.js, and V8. Electron keeps up-to-date with these projects to provide our users with new JavaScript features, performance improvements, and security fixes. Each of these packages has a major version bump in Electron 5: Chromium 73.0.3683.119, Node.js 12.0.0, and V8 7.3.492.27. Electron 5 also includes improvements to Electron-specific APIs. A summary of the major changes is below; for the full list of changes, check out the Electron v5.0.0 release notes. So what’s next? Although we are careful not to make promises about release dates, our plan is release new major versions of Electron with new versions of those components approximately quarterly.

read more

Chris Coyier CSS-Tricks

Using Netlify functions to send emails with a JAMstack-style site

How do you send email from a JAMstack-style site? Chris Coyer writes on CSS-Tricks: Let’s say you’re rocking a JAMstack-style site (no server-side languages in use), but you want to do something rather dynamic like send an email. Not a problem! That’s the whole point of JAMstack. It’s not just static hosting. It’s that plus doing anything else you wanna do through JavaScript and APIs. Here’s the setup…

read more

Rich Harris svelte.dev

Svelte 3: rethinking reactivity

After several months of being just days away, we are over the moon to announce the stable release of Svelte 3. This is a huge release representing hundreds of hours of work by many people in the Svelte community, including invaluable feedback from beta testers who have helped shape the design every step of the way. Lots of folks (myself included) have been eagerly awaiting this release after Rich teed it up on The Changelog #332. We’d love to hear your first impressions!

read more

0:00 / 0:00