A JavaScript Less Future - New Browser APIs and Their Impact on the Future of React Development

Bookmark
Rate this content

In recent years we've seen browsers deliver powerful APIs such as popover, anchor, Navigation, View Transition, interpolate-size, :has(), and many more. Each addresses a problem that was previously only solve-able with JavaScript. What does this mean for the future of React development? A future with less JavaScript for interaction logic. In this talk we'll discuss how you can leverage these new APIs and the impacts they will have on, application performance, developer experience, user experience, and the future of React app development.

This talk has been presented at React Summit US 2025, check out the latest edition of this React Conference.

FAQ

Amir Sami's talk, 'A JavaScript Less Future,' discusses new browser APIs and their impact on the future of front-end development, specifically focusing on reducing the amount of JavaScript needed.

Some of the new browser APIs mentioned include the popover API, anchor API, has API, highlight API, and relative color API.

The popover API simplifies the logic for toggling the date picker panel by removing the need for conditional rendering and document event listeners, thus reducing the complexity and amount of JavaScript code.

The anchor API allows elements to be anchored to a specific position relative to another element, reducing the complexity of positioning logic and ensuring elements are not cut off by the viewport.

The highlight API allows for styling specific text ranges within a content editable element, eliminating the need for duplicate layers and reducing the amount of JavaScript needed to handle text highlighting.

The new browser APIs enhance front-end development by reducing JavaScript code, simplifying logic, improving user experience, and providing native solutions for tasks that previously required complex JavaScript.

Amir Sami emphasizes 'a future with less JavaScript' because new browser APIs enable developers to achieve more with native browser capabilities, reducing the need for additional JavaScript code and improving performance.

14 years ago, developers faced challenges such as centering elements, modifying URLs without reloading, and styling placeholders, which were difficult due to the limitations of browser capabilities at the time.

The view transition API facilitates smooth animations between state changes in web applications, enhancing user experience without requiring complex JavaScript animations.

Interested individuals can stay in touch with Amir Sami by adding him on LinkedIn, visiting his website for blog posts, slides, and code, or emailing him with any questions.

Ameer Sami
Ameer Sami
21 min
21 Nov, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Introduction to JavaScript Less Future, impact of new browser APIs on front-end development, S&C Electric Company overview, shift towards less JavaScript, historical perspective of web development challenges, importance of browser APIs in modern development, focus on key browser APIs for enhanced user experiences, demonstration of date picker functionality. Exploring Date Picker Functionality with Code Integration and Browser APIs. Closing Panel and Utilizing New Browser APIs for Date Time Picker. Controlling Date Time Picker Panel Position with New Browser APIs. Customizing Date Range Styling with CSS and Anchor API. Animating Date Range Picker with View Transitions and CSS Attributes. Developing Text Formatter with Dual Layers and Event Handling. Developing Plain Text Only Content Editable Layer with Highlighting API. Applying Styles with CSS Selector and Color API.

1. Understanding JavaScript Less Future

Short description:

Introduction to JavaScript Less Future, impact of new browser APIs on front-end development, S&C Electric Company overview, shift towards less JavaScript, historical perspective of web development challenges, importance of browser APIs in modern development, focus on key browser APIs for enhanced user experiences, demonstration of date picker functionality.

Hi, there. Welcome to a JavaScript Less Future. New browser APIs and their impact on the future of front-end development. My name is Amir Sami. I'm a staff software engineer at S&C Electric Company. Just so that way we're not strangers, I'll tell you a little bit about myself. In my free time, I like to bake delicious baked goods, like this pie. I like to program. It's not just a profession, it's a hobby of mine as well. I like to hike and explore nature, and I like to lift heavy circles for some weird reason. I know it's a weird combo.

Now, I work at S&C Electric Company, which is a global provider of equipment and services for electric power systems. We were founded in 1911 in Chicago, where we design and manufacture switching and protection products. Today, our diverse global workforce develops innovative solutions for a more intelligent and resilient electrical grid. Building on this legacy of technological innovation and customer service, S&C empowers the transformation of the grid for an outage-free, sustainable electrical energy future.

So the talk title is a JavaScript Less Future, but you're probably wondering, what the heck do I mean by that? I mean a future with less JavaScript. But it's not a future with no JavaScript, just less. Now, before we talk about the future, I want to take a step back in time and look at how difficult it was to be a software engineer for the web back in the day, about 14 years ago. For some of the more seasoned software engineers in the audience, I'm sure you've probably seen Stack Overfill questions like this one, like how can I horizontally center an element? This was asked about 17 years ago, and the first accepted answer for this was just to set a margin auto with 50%, which we know now there's a lot more things we can do to center an element. Another question was, how can I modify the URL without reloading the page? And the answer to this back in 09 was just that there's no way to do that. Now we know that there are ways to do that, but back then, this wasn't something you could do. And lastly, is the question of how can you change the styling of a placeholder with an input? The answer to this back in 2010 was that this was only available or possible with browsers that were enabled with WebKit. So now we've taken a look at what it was like to be a software engineer back in the day without some of the new browser APIs that available to us now. And we have a better appreciation for browser APIs and what they enable us to do. So there's been a lot of new browser APIs that have released in the most recent years, such as the hat selector in CSS, backdrop filter, the attribute function in CSS, scope, along with many other powerful browser APIs. But for the sake of today's talk, I'm only going to be focusing on these eight browser APIs and how I believe we can use them to write less JavaScript and provide better experiences to our users. Now I'll be walking you through that by walking you through two demos, a date picker, specifically date range picker and a text formatter. What does the date picker look like? Well, this is the date picker I created. You can open and close it by clicking on the field. The panel appears below the field.

2. Enhancing Date Picker Functionality

Short description:

Exploring Date Picker Functionality with Code Integration and Browser APIs.

When you select a start date and you hover over any other dates after the start date, we can see that the range highlights and you can close the panel by either clicking on the field or clicking outside of the component entirely.

Now let's take a look at some code to see how this works before we integrate with the new browser APIs. Here we have the button element, which is representative of the field that we saw. And you'll notice that there's an on-click handler here, which when the user clicks on the button, we set a stateful variable to toggle whether the panel appears or not.

If we take a look at the code for the panel, we'll notice that it's conditionally rendered. And if we look further into the panel, we have multiple buttons. Each button represents each of the individual dates within the range or within the picker. And we have a mouse handler mouse over handler rather for each of those buttons.

What this mouse over handler does is if we take a look at that, we'll notice that every time user mouse is over one of those dates, we get all the children within the panel and we iterate over them. And if it's within the range of the selected start date and the date or the element that the user is hovering over, we set a background to this blue color. And if it's not, then we preset the value to nothing. So it goes back to the default styling.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Install Nothing: App UIs With Native Browser APIs
JSNation 2024JSNation 2024
31 min
Install Nothing: App UIs With Native Browser APIs
Top Content
This Talk introduces real demos using HTML, CSS, and JavaScript to showcase new or underutilized browser APIs, with ship scores provided for each API. The dialogue element allows for the creation of modals with minimal JavaScript and is supported by 96% of browsers. The web animations API is a simple and well-supported solution for creating animations, while the view transitions API offers easy animation workarounds without CSS. The scroll snap API allows for swipers without JavaScript, providing a smooth scrolling experience.
Pushing the Limits of Video Encoding in Browsers With WebCodecs
JSNation 2023JSNation 2023
25 min
Pushing the Limits of Video Encoding in Browsers With WebCodecs
Top Content
Watch video: Pushing the Limits of Video Encoding in Browsers With WebCodecs
This Talk explores the challenges and solutions in video encoding with web codecs. It discusses drawing and recording video on the web, capturing and encoding video frames, and introduces the WebCodecs API. The Talk also covers configuring the video encoder, understanding codecs and containers, and the video encoding process with muxing using ffmpeg. The speaker shares their experience in building a video editing tool on the browser and showcases Slantit, a tool for making product videos.
WebHID API: Control Everything via USB
JSNation 2022JSNation 2022
23 min
WebHID API: Control Everything via USB
Today's Talk introduces the webHID API, which allows developers to control real devices from the browser via USB. The HID interface, including keyboards, mice, and gamepads, is explored. The Talk covers device enumeration, input reports, feature reports, and output reports. The use of HID in the browser, especially in Chrome, is highlighted. Various demos showcase working with different devices, including a DualShock controller, microphone, gamepad, and Stream Deck drum pad. The Talk concludes with recommendations and resources for further exploration.
Automate the Browser With Workers Browser Rendering API
JSNation 2024JSNation 2024
20 min
Automate the Browser With Workers Browser Rendering API
The Talk discusses browser automation using the Worker's Browser Rendering API, which allows tasks like navigating websites, taking screenshots, and creating PDFs. Cloudflare integrated Puppeteer with their workers to automate browser tasks, and their browser rendering API combines remote browser isolation with Puppeteer. Use cases for the API include taking screenshots, generating PDFs, automating web applications, and gathering performance metrics. The Talk also covers extending sessions and performance metrics using Durable Objects. Thank you for attending!
Visualising Front-End Performance Bottlenecks
React Summit 2020React Summit 2020
34 min
Visualising Front-End Performance Bottlenecks
React's web-based tools allow for independent learning. Dazzone, a sports streaming service, faces challenges with low memory and CPU targets. Measuring, analyzing, and fixing performance issues is crucial. Virtualization improves rendering efficiency and performance. The application is now much faster with significantly less jank.
MIDI in the Browser... Let's Rock the Web!
JSNation 2022JSNation 2022
28 min
MIDI in the Browser... Let's Rock the Web!
MIDI is a versatile communication protocol that extends beyond music and opens up exciting possibilities. The Web MIDI API allows remote access to synths and sound modules from web browsers, enabling various projects like music education systems and web audio-based instruments. Developers can connect and use MIDI devices easily, and the Web MIDI API provides raw MIDI messages without semantics. The WebMidi.js library simplifies working with the Web MIDI API and offers a user-friendly interface for musicians and web developers. MIDI on the web has generated significant interest, with potential for commercial growth and endless possibilities for web developers.

Workshops on related topic

Writing Universal Modules for Deno, Node and the Browser
Node Congress 2022Node Congress 2022
57 min
Writing Universal Modules for Deno, Node and the Browser
Workshop
Luca Casonato
Luca Casonato
This workshop will walk you through writing a module in TypeScript that can be consumed users of Deno, Node and the browsers. I will explain how to set up formatting, linting and testing in Deno, and then how to publish your module to deno.land/x and npm. We’ll start out with a quick introduction to what Deno is.