Digging Into React Context

You may have wondered lately what all the buzz is about Context and what it might mean for you and your React sites. Before Context, when the management of state gets complicated beyond the functionality of setState, you likely had to make use of a third party library. Thanks to recent updates by the awesome React team, we now have Context which might help with some state management issues.

What Does Context Solve?

How do you move the state …

The post Digging Into React Context appeared first on CSS-Tricks.

​​Build live comments with sentiment analysis using Nest.js

(This is a sponsored post.)

Interestingly, one of the most important areas of a blog post is the comment section. This plays an important role in the success of a post or an article, as it allows proper interaction and participation from readers. This makes it inevitable for every platform with a direct comments system to handle it in realtime.

In this post, we’ll build an application with a live comment feature. This will happen in realtime as …

The post ​​Build live comments with sentiment analysis using Nest.js appeared first on CSS-Tricks.

Creating a Bar Graph with CSS Grid

If you’re looking for more manageable ways to create bar graphs, or in search of use cases to practice CSS Grid layout, I got you!

Before we begin working on the graph, I want to talk about coding the bars, when Grid is a good approach for graphs, and we’ll also cover some code choices you might consider before getting started.

Preface

The bar is a pretty basic shape: you can control its dimensions with CSS width, height, …

The post Creating a Bar Graph with CSS Grid appeared first on CSS-Tricks.

A Quick Roundup of Recent React Chatter

Like many, many others, I’m in the pool of leveling up my JavaScript skills and learning how to put React to use. That’s why Brad Frost resonated with me when he posted My Struggle to Learn React.”

As Brad does, he clearly outlines his struggles point-by-point:

  • I have invested enough time learning it
  • React and ES6 travel together
  • Syntax and conventions
  • Getting lost in this-land
  • I haven’t found sample projects or tutorials that match how i tend to work

The post A Quick Roundup of Recent React Chatter appeared first on CSS-Tricks.

How to Create a Child Page in WordPress

Do you want to create a child page on your site? Pages in WordPress can be standalone or hierarchical, which means a page can have its own sub-pages also known as child pages. In this article, we will show you how to easily create a… Read More »

The post How to Create a Child Page in WordPress appeared first on WPBeginner.

Your Brain on Front-End Development

Part of the job of being a front-end developer is applying different techniques and technologies to pull off the desired UI and UX. Perhaps you work with a design team and implement their designs. I know when I look at a design (heck, even if I know I’m not going to be building it), my front-end brain starts triggering all sorts of things I know will be related to the task.

Let’s take a look at what I mean.…

The post Your Brain on Front-End Development appeared first on CSS-Tricks.

Understanding the Almighty Reducer

I was recently mentoring someone who had trouble with the .reduce() method in JavaScript. Namely, how you get from this:

const nums = [1, 2, 3]
let value = 0

for (let i = 0; i < nums.length; i++) {
value += nums[i]
}

…to this:

const nums = [1, 2, 3]
const value = nums.reduce((ac, next) => ac + next, 0)

They are functionally equivalent and they both sum up all the numbers in the array, but there is …

The post Understanding the Almighty Reducer appeared first on CSS-Tricks.

More Unicode Patterns

Creating is the most intense excitement one can come to know.

Anni Albers, On Designing

I recently wrote a post — that was shared here on CSS-Tricks — where I looked at ways to use Unicode characters to create interesting (and random) patterns. Since then, I’ve continued to seek new characters to build new patterns. I even borrowed a book about Unicode from a local library.

(That’s a really thick book, by the way.)

It’s all up to …

The post More Unicode Patterns appeared first on CSS-Tricks.

How to Add a Search Bar to WordPress Menu (Step by Step)

Do you want to add a search bar to your WordPress navigation menu? Search form can be really helpful for your users to find what they’re looking for on your site. In this article, we will show you how to add a search bar to… Read More »

The post How to Add a Search Bar to WordPress Menu (Step by Step) appeared first on WPBeginner.