Pull to refresh
38.28

ReactJS *

JavaScript library for interfaces creation

Show first
Rating limit
Level of difficulty

React Custom Hook: useDarkMode

Level of difficulty Medium
Reading time 4 min
Views 2.5K

One of the main advantages of "useDarkMode" is its simplicity. With just a few lines of code, you can enable dark mode in your React application. By invoking this hook, you'll receive the current dark mode state and a function to toggle it.

The "useDarkMode" hook dynamically updates the HTML body class to apply the "dark-mode" styling whenever dark mode is enabled. This approach ensures consistency across all components without the need for manual class manipulation.

Read more
Total votes 6: ↑4 and ↓2 +2
Comments 0

React Custom Hook: useCopyToClipboard

Level of difficulty Medium
Reading time 2 min
Views 1.7K

Copying text to the clipboard in a React application can be a tedious task. To simplify this process, I've created a powerful custom hook called useCopyToClipboard. With just a few lines of code, this hook streamlines the copy-to-clipboard functionality, providing developers with a hassle-free solution.

Read more
Rating 0
Comments 0

React Custom Hook: useCookie

Level of difficulty Medium
Reading time 4 min
Views 2.9K

One of the key advantages of this custom hook is the ability to update the cookie value. The updateCookie function, returned by useCookie, enables you to modify the value of the cookie. By invoking this function with a new value and optional options, such as expiration or path, you can instantly update the cookie.

Read more
Rating 0
Comments 0

React Custom Hook: useClickOutside

Level of difficulty Medium
Reading time 2 min
Views 2.5K

The potential applications for useClickOutside are endless. It is particularly useful when implementing modal windows, dropdown menus, or any element that should be closed when a user interacts with anything outside of it. By incorporating useClickOutside, you can enhance the user experience by providing intuitive and efficient interactions.

Read more
Rating 0
Comments 3

React Custom Hook: useArray

Level of difficulty Medium
Reading time 2 min
Views 6.3K

In this article series, we embark on a journey through the realm of custom React hooks, discovering their immense potential for elevating your development projects. Our focus today is on the "useArray" hook, one of the many carefully crafted hooks available in the collection of React custom hooks.

Read more
Rating 0
Comments 0

Supercharge Your React Projects with Custom Hooks

Level of difficulty Medium
Reading time 42 min
Views 8.1K

In this article, we dive into the world of custom React hooks and explore the incredible potential they hold for supercharging your work projects. With over 20 carefully crafted hooks at your disposal, I personally utilize these hooks in my own work projects, and now I'm excited to share them with you. From enhancing functionality to streamlining workflows, these custom hooks are designed to empower developers and deliver user-friendly experiences. Join us on this journey as we unleash the power of these 20+ hooks and unlock new levels of productivity and innovation in your React projects.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 2

How did I increase the website performance score from 35 to 100 for both mobile and desktop?

Level of difficulty Easy
Reading time 5 min
Views 1.5K

Not long ago, I started my personal blog. Instead of opting for the traditional route of using the popular WordPress CMS for blogs, I decided to embrace new technologies. My choice landed on Next.js and a NoSQL-type database.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 0

How to Create a Color Picker in React Native

Level of difficulty Easy
Reading time 2 min
Views 1.8K

React Native is a popular JavaScript library for creating mobile applications for both Android and iOS devices. One of the most useful components that you can use in React Native is a color picker. A color picker allows users to select a specific color from a range of colors. In this tutorial, we will show you how to create a color picker in React Native.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 1

Tutorial: Frontity — Setting Up Authorization for WordPress Private Endpoints

Reading time 2 min
Views 885

Foreword

This tutorial is intended primarily for those new to Frontity (React framework for WordPress) development.

Primary goal

Collect in one place all the necessary information for setting up authorization for WordPress private endpoints using the example of getting a menu collection (wp-json/wp/v2/menus).

Read more
Rating 0
Comments 2

Electron + web camera (cpp-ffmpeg)

Reading time 8 min
Views 3.5K

An example of using Electron + React JS and a native ffmpeg addon to access a webcamera

This guide may be helpful to someone who is trying to find a way
to work with Electron if they need to use a c++ library or code

I was looking for a more realistic example than a simple 'hello world' and i didn't succeed

Here are the links in advance:

- electron - https://github.com/khomin/electron_camera_ffmpeg

- addon - https://github.com/khomin/electron_ffmpeg_addon_camera

So let me share my experience...

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

You don't know Redis (Part 2)

Reading time 4 min
Views 2.4K

In the first part of You don't know Redis, I built an app using Redis as a primary database. For most people, it might sound unusual simply because the key-value data structure seems suboptimal for handling complex data models.

In practice, the choice of a database often depends on the application’s data-access patterns as well as the current and possible future requirements.

Redis was a perfect database for a Q&A board. I described how I took advantage of sorted sets and hashes data types to build features efficiently with less code.

Now I need to extend the Q&A board with registration/login functionality.

I will use Redis again. There are two reasons for that.

Firstly, I want to avoid the extra complexity that comes with adding yet another database.

Secondly, based on the requirements that I have, Redis is suitable for the task.

Important to note, that user registration and login is not always about only email and password handling. Users may have a lot of relations with other data which can grow complex over time.

Despite Redis being suitable for my task, it may not be a good choice for other projects.

Always define what data structure you need now and may need in the future to pick the right database.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

How to create LinkedIn-like reactions with Serverless Redis

Reading time 5 min
Views 1.6K

As a side hustle, I teach tech recruiters web and software development technologies using plain English. It helps them with understanding job specs and resumes and it makes all of us, tech people, happier.

I run a weekly newsletter and often get feedback from recruiters via email or LinkedIn DMs.

I thought that I could try to collect feedback using the “Reactions” feature just like LinkedIn or Facebook does. It’s not as informative as personalised messages but is a simple feature that may incentivize more people to provide some general feedback.

Either way, it’s worth trying and as a software developer, I can’t wait to implement it.

This tutorial is about implementing a feature that will be used in real life on my project.

Read more
Rating 0
Comments 0

You don't know Redis

Reading time 8 min
Views 4.2K

Originally posted on DEV.to

In my previous post, I touched on the point that Redis is more than just an in-memory cache.

Most people do not even consider Redis as a primary database. There are a lot of use cases where Redis is a perfect choice for non-cache related tasks.

In this article, I will demonstrate how I built a fully functional Q&A board for asking and upvoting the most interesting questions. Redis will be used as a primary database.

I will use Gatsby (React), Netlify serverless functions and Upstash Serverless Redis.

Upstash has been a good choice so far and I decided to try it out in a more serious project. I love everything serverless and how it makes things simpler for me.

Serverless will be a great choice for most tasks however you need to know the pros and cons of the tech you are using. I encourage you to learn more about serverless to get the most out of it.

Read more
Total votes 5: ↑5 and ↓0 +5
Comments 3

Only 39% of the functions in node_modules are unique in the default Angular project

Reading time 21 min
Views 2.7K

Only 39% of the functions in node_modules are unique in the default Angular project created by ng new my-app.


I think the developers of open source solve problems in the same ways, because they study the same algorithms. Well, why be honest, they copy the popular solutions from StackOverflow also.


Read more →
Rating 0
Comments 0

10+ Biggest Remote Tech Jobs Aggregators Comparison

Reading time 7 min
Views 3.8K

There is a myriad of articles about where to find remote jobs, particularly in tech. Some of them are outdated and most of them don't provide detailed reviews. So that's why I decided to do my own research. I did a basic search by "React" skill (where possible) and expected to see mostly "Frontend Developer" vacancies.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

7 Best Practices Every Budding React.JS Developer Must Follow to Excel

Reading time 4 min
Views 6.1K
image

With the advancement in web technology, the entire globe is sliding towards the online tech sphere. The globe around us is going tech-centric day by day and thus the demand for front-end designers and developers also.

Whatever, be the purpose, people just google things and get their desired result. This is all because of the increase in the evolution of web and mobile app development. While we all know that to be a Web developer, you need to have basic skills of HTML, CSS, and JavaScript, but, with time React.js emerged into the technology stack of the web development field and outdated JavaScript.

A Report by JS reflects that 64.8% of the web developers prefer to use the React.JS framework and would love to use it again and again in the future. It has even beaten other categories of frameworks that are Vue.js with 28.8% votes and Angular with 23.9% votes. This is the reason why the demand for React.JS development companies is at an all-time high.

image

With React, it becomes painless to build an interactive user interface. It efficiently updates and renders the right components when changes are made.

Before you use React.js as web technology, let’s have a look at the practices that every React.js developer should follow to write better react codes for their application.
Read more →
Total votes 1: ↑1 and ↓0 +1
Comments 2

Authors' contribution