Search

Nalezeno "React": 140

Using Parcel as a Bundler for React Applications


You may already be familiar with webpack for asset management on projects. However, there’s another cool tool out there called Parcel, which is comparable to webpack in that it helps with hassle-free asset bundling. Where Parcel really shines is that it requires zero configuration to get up...

The Circle of a React Lifecycle


A React component goes through different phases as it lives in an application, though it might not be evident that anything is happening behind the scenes. Those phases are: mounting updating unmounting error handling There are methods in each of these phases that make it possible to perform...

Tabs: It’s Complicated™


I've said before one quick and powerful thing you can learn as a front-end developer just getting starting with JavaScript is changing classes. const button = document.querySelector(".my-button"); const element = document.querySelector(".content"); button.addEventListener("click", function()...

Advanced Tooling for Web Components


Over the course of the last four articles in this five-part series, we’ve taken a broad look at the technologies that make up the Web Components standards. First, we looked at how to create HTML templates that could be consumed at a later time. Second, we dove into creating our own custom element....

Accessibility is not a “React Problem”


Leslie Cohn-Wein's main point: While [lots of divs, inline styles, focus management problems] are valid concerns, it should be noted that nothing in React prevents us from building accessible web apps. True. I'm quite capable (and sadly, guilty) of building inaccessible interfaces with React...

Using React Loadable for Code Splitting by Components and Routes


In a bid to have web applications serve needs for different types of users, it’s likely that more code is required than it would be for one type of user so the app can handle and adapt to different scenarios and use cases, which lead to new features and functionalities. When this happens, it’s...

Writing Tests for React Applications Using Jest and Enzyme


While it is important to have a well-tested API, solid test coverage is a must for any React application. Tests increase confidence in the code and helps prevent shipping bugs to users. That’s why we’re going to focus on testing in this post, specifically for React applications. By the end, you’ll...

The Magic of React-Based Multi-Step Forms


One way to deal with long, complex forms is to break them up into multiple steps. You know, answer one set of questions, move on to another, then maybe another, and so on and so forth. We often refer to these as multi-step forms (for obvious reasons), but others also take to calling it a “wizard”...

What Hooks Mean for Vue


Not to be confused with Lifecycle Hooks, Hooks were introduced in React in v16.7.0-alpha, and a proof of concept was released for Vue a few days after. Even though it was proposed by React, it’s actually an important composition mechanism that has benefits across JavaScript framework ecosystems,...

React 16.6.0 Goodies


React 16.6.0 was released October 2018 and with it came goodies that spice up the way we can develop with React. We’re going to cover what I consider the best of those new goodies with examples of how we can put them to use in our work. React.memo() avoids unnecessary re-rendering There...

React indeterminate


I’ve fallen in love with React.js and JSX over the years; state-based rendering and a logical workflow have made me see the light of this modern framework. That doesn’t mean I don’t sometimes get a bit frustrated that the “simple” things seem harder than they should...

Intro to React Hooks


Hooks make it possible to organize logic in components, making them tiny and reusable without writing a class. In a sense, they’re React’s way of leaning into functions because, before them, we’d have to write them in a component and, while components have proven to be powerful and functional...

Using React Portals to Render Children Outside the DOM Hierarchy


Say we need to render a child element into a React application. Easy right? That child is mounted to the nearest DOM element and rendered inside of it as a result. render() { return ( <div> // Child to render inside of the div </div> ); } But! What if we want...

Animating Between Views in React


You know how some sites and web apps have that neat native feel when transitioning between two pages or views? Sarah Drasner has shown some good examples and even a Vue library to boot. These animations are the type of features that can turn a good user experience into a great one. But to achieve...

Making SVG icon libraries for React apps


Nicolas Gallagher: At Twitter I used the approach described here to publish the company’s SVG icon library in several different formats: optimized SVGs, plain JavaScript modules, React DOM components, and React Native components. There is no One True Way© to make an SVG icon system. The only...

JavaScript to Native (and Back!)


I admit I'm quite intrigued by frameworks that allow you write apps in web frameworks because they do magic to make them into native apps for you. There are loads of players here. You've got NativeScript, Cordova, PhoneGap, Tabris, React Native, and Flutter. For deskop apps, we've got Electron....

Rendering Lists Using React Virtualized


Working with data in React is relatively easy because React is designed to handle data as state. The hassle begins when the amount of data you need to consume becomes massive. For example, say you have to handle a dataset which is between 500-1,000 records. This can result in massive loads and lead...

Compound Components in React Using the Context API


Compound components in React allow you to create components with some form of connected state that’s managed amongst themselves. A good example is the Form component in Semantic UI React. To see how we can implement compound components in a real-life React application, we’ll build a compound...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace