Search

Nalezeno "React": 140

Considerations for Creating a Card Component


Here's a Card component in React: const Card = props ={ return( <div className="card"<h2{props.title}</h2<p{props.content}</p</div) } It might be pretty useful! If you end up using this thing hundreds of times, now you have the ability to refactor a little bit of HTML...

Why JavaScript is Eating HTML


Web development is always changing. One trend in particular has become very popular lately, and it fundamentally goes against the conventional wisdom about how a web page should be made. It is exciting for some but frustrating for others, and the reasons for both are difficult to explain. A...

The Hooks of React Router


React Router 5 embraces the power of hooks and has introduced four different hooks to help with routing. You will find this article useful if you are looking for a quick primer on the new patterns of React Router. But before we look at hooks, we will start off with a new route rendering...

Apollo GraphQL without JavaScript


It's cool to see progressive enhancement being done even while using the fanciest of the fancy front-end technologies. This is a button in a JSX React component that has a click handler applied directly to it that fires a data mutation Ajax request through Apollo GraphQL. That is about the least...

Debunking the Myth: Accessibility and React


I find it notable when the blog of a major accessibility-focused company like Deque publishes an article called Debunking the Myth: Accessibility and React. Mark Steadman is essentially saying if a site has bad accessibility, it ain't React... it's you. The tools are there to achieve good...

How to the Get Current Page URL in Gatsby


This seemingly simple task had me scratching my head for a few hours while I was working on my website. As it turns out, getting the current page URL in Gatsby is not as straightforward as you may think, but also not so complicated to understand. Let’s look at a few methods of making it happen....

Two Lessons I Learned From Making React Components


Here’s a couple of lessons I’ve learned about how not to build React components. These are things I've come across over the past couple of months and thought they might be of interest to you if you’re working on a design system, especially one with a bunch of legacy technical decisions and a lot...

Domain-Driven Design With React


There is very little guidance on how to organize front-end applications in the world of React. (Just move files around until it “feels right,” lol). The truth is that we can do better. Let’s take a look at one pattern you might consider using to architect your site. At first, you might split...

Scroll, Refraction and Shader Effects in Three.js and React


Discover how to use react-three-fiber and combine some common techniques to create a Three.js powered layout with shader effects. Scroll, Refraction and Shader Effects in Three.js and React was written by Paul Henschel and published on Codrops

Collective #574


Happy Hues * JavaScript Visualized * Styled Components, Styled Systems * Raw WebGL * Bravo Studio App Collective #574 was written by Pedro Botelho and published on Codrops

Testing React Hooks With Enzyme and React Testing Library


As you begin to make use of React hooks in your applications, you’ll want to be certain the code you write is nothing short of solid. There’s nothing like shipping buggy code. One way to be certain your code is bug-free is to write tests. And testing React hooks is not much different from how React...

Build your own React


Wowza! Rodrigo Pombo’s article about how to build React from scratch is fantastic, not only because it’s well written, but because of the outstanding interaction design: each line in the code examples ge highlighted and explored in further detail as you scroll down the page. This makes it super...

The Kind of Development I Like


I'm turning 40 next year (yikes!) and even though I've been making websites for over 25 years, I feel like I'm finally beginning to understand the kind of development I like. Expectedly, these are not new revelations and my views can be summed up by two older Computer Science adages that pre-date...

React Hooks, které potřebujete znát


React s verzí 16.8 přináší zásadní novinku, a tou jsou Hooks, které mají přinést řešení pro hned 3 největší problémy, se kterými se v Reactu potýkáme. Implementace komponent pomocí tříd, sdílení logiky, nepraktický způsob práce s životním cyklem komponent. Představíme vám React Hooks a na konci...

Working with Fusebox and React


If you are searching for an alternative bundler to webpack, you might want to take a look at FuseBox. It builds on what webpack offers — code-splitting, hot module reloading, dynamic imports, etc. — but code-splitting in FuseBox requires zero configuration by default (although webpack will offer...

The Landscape of Cross-Platform App Development


I don't track this stuff very well, but I get it. If you want a native app for Android and iOS, it sure would be nice to only have to write it once rather than two very different languages. Roughly double your reach without doubling the work. More and more of these things are reaching into desktop...

Understanding How Reducers are Used in Redux


A reducer is a function that determines changes to an application’s state. It uses the action it receives to determine this change. We have tools, like Redux, that help manage an application’s state changes in a single store so that they behave consistently. Why do we mention Redux when talking...

Demonstrating Reusable React Components in a Form


Components are the building blocks of React applications. It’s almost impossible to build a React application and not make use of components. It’s widespread to the point that some third-party packages provide you with components you can use to integrate functionality into your application. These...

A Dark Mode Toggle with React and ThemeProvider


I like when websites have a dark mode option. Dark mode makes web pages easier for me to read and helps my eyes feel more relaxed. Many websites, including YouTube and Twitter, have implemented it already, and we’re starting to see it trickle onto many other sites as well. In this tutorial, we’re...

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