teleren/devto huggingface dataset:
Take me to a Beach! T-T
Tags: devchallenge, frontendchallenge, css, javascript
Published: 2024-06-01 20:29:27

_This is a submission for [Frontend Challenge v24.04.17]((https://dev.to/challenges/frontend-2024-05-29), Glam Up My Markup: Beaches_

## What I Built
I was trying to build a table on a beach that would show different beaches in the form of cards. I wanted to give it a relaxed and "beachy" look with the help of textures and warm colors. 

## Demo
I have made this for PC screens only(Pardon me for being lazy). Best viewed in 1024x532.

Keyboard Inputs are also supported:

```
SpaceBar: To begin exploring.
Left and Right Arrows: To navigate the gallery.
Escape: To exit the gallery and move to landing page.
```

{% codepen https://codepen.io/dhrutisubham/pen/vYwxyNR %}
_Edit: I am facing some issues with applying a hosted font on codepen. Make sure you check out netlify site as well :)_

_[View the full code here](https://github.com/dhrutisubham/glam-up-dhrutisundar)_
_[Hosted on Netlify as well](https://beaches-damn.netlify.app/)_

## Journey
I was excited to participate in the frontend challenges(Yes! This is the first time :P). When I saw the topic, I started diving deep into all kinds of illustrations(Freepik) and fonts(Google Fonts and Google Search :P) I could collect to get something into shape. 

I thought showing different beaches on paper cards would be simple and cool. So, I dived into Figma and built a desktop screen for the landing page. 

Given that beaches are filled with shuttle movements of nature(waves, wind and creatures), I wanted to add some transitions and animations with the help of [GSAP](https://gsap.com/). I was also dreaming of putting a crab that would randomly crawl in and out, but I decided to be happy with being able to imagine it.(Laziness-2 Me-0)


##Credits
Illustrations: [Freepik](freepik.com)
Beach Images: [Google Images](images.google.com)
Fonts: [Beach](https://www.1001fonts.com/beach-font.html), [Josefin Sans](https://fonts.google.com/specimen/Josefin+Sans)
Transitions: [GSAP](https://gsap.com/)
What state management system should I use with React Query for my MERN Stack project?
Published: 2024-06-01 20:28:58

Hi Dev.io community,

I'm currently working on a project using the MERN Stack (MongoDB, Express.js, React, Node.js) and I'm planning to use React Query for handling server state and data fetching. Given this setup, what state management system would you recommend for managing the client-side state in my application?

To provide more context, I have experience with both the Context API and Redux Toolkit. Additionally, the project involves a complex database structure, so I need a robust solution that integrates well with React Query and can handle intricate state management requirements.

Thanks for your suggestions!
Error Boundary in React js
Tags: react, webdev, javascript, programming
Published: 2024-06-01 20:16:13

In React, an Error Boundary is a component that helps catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of crashing the entire application. This feature is particularly useful for improving the user experience by gracefully handling unexpected errors.

## **Key Concepts of Error Boundaries**

**1. Definition and Use:**

Error boundaries are React components that catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.

They do not catch errors for:

- Event handlers (use try-catch in the event handler).
- Asynchronous code (e.g., setTimeout or requestAnimationFrame 
  callbacks).
- Server-side rendering.
- Errors thrown in the error boundary itself (e.g., inside componentDidCatch).

**2. How to Create an Error Boundary:**

> An error boundary is any React component that implements either componentDidCatch lifecycle method or the static getDerivedStateFromError method.

```
import React from 'react';

class ErrorBoundary extends React.Component {
  constructor(props) {
    super(props);
    this.state = { hasError: false };
  }

  static getDerivedStateFromError(error) {
    // Update state so the next render will show the fallback UI.
    return { hasError: true };
  }

  componentDidCatch(error, errorInfo) {
    // You can also log the error to an error reporting service
    console.error("Error caught by ErrorBoundary:", error, errorInfo);
  }

  render() {
    if (this.state.hasError) {
      // You can render any custom fallback UI
      return <h1>Something went wrong.</h1>;
    }

    return this.props.children; 
  }
}
```

**3. Using an Error Boundary:**

```
<ErrorBoundary>
  <AppComponet />
</ErrorBoundary>

```

## **Best Practices**

**1. Granularity:**

It's better to place error boundaries at the top level of your application to catch all errors, but you can also place them around specific components to isolate errors within specific parts of your app.

**2. Logging:**

Implement logging in componentDidCatch to send error details to an error monitoring service (e.g., Sentry, LogRocket).

**3. Fallback UI:**

Make sure the fallback UI is user-friendly and provides a way to recover from the error if possible (like a "Try Again" button).

## **Limitations.**

**1. Event Handlers:**

Error boundaries do not catch errors inside event handlers. You need to handle those manually using try-catch blocks.

**2. Async Code:**

Errors in asynchronous code should be handled within the async functions using try-catch blocks.

## **Example in Functional Components**

With the introduction of hooks, you might wonder about using error boundaries in functional components. As of now, React does not provide hooks for error boundaries. You must use class components for creating error boundaries.

In summary, React's Error Boundaries are a robust way to handle errors gracefully in your application, ensuring that users have a smooth experience even when something goes wrong.
AVIF Studio - Chrome Extension made with Svelte and WebAssembly for Image Editing & Annotation
Tags: svelte, webassembly, avif
Published: 2024-06-01 20:12:28

## AVIF STUDIO 
Chrome Extension made with Svelte and WebAssembly for Image Editing & Annotation
[LINK TO INSTALL](https://chromewebstore.google.com/detail/avif-studio/bcnhebdciabcnffgcgdpkkniplccpfap?hl=en)

{% youtube qe9Q6XdJYow %}

AVIF Studio is a simple Chrome extension for basic image conversion and image editing.

You can convert images to multiple image formats including AVIF, PNG, WEBP , JPEG & PDF. AVIF Studio can also be used to create customized photo collages. Various templates are available that can be customized to suit your requirements and use cases.

AVIF Studio is equipped with the tools to remove the background from your images and then add new background images of your choice.

The Image processing utilities are developed with WebAssembly integrated with Svelte. That means all the image processing operations including AI operations and image format conversions are taking place inside our browser and there is no need to upload our images to any server for processing. Your images will never leave your computer / browser. This gives you 100% data privacy and security.
Oluwanifemi's Day 1 of Forever
Tags: opensource, outreachy, osm, hotosm
Published: 2024-06-01 20:00:25

The people I admire the most used to be healthcare professionals, like my eye doctor. Once, I spent a good time telling him how he was making lives better. I mean he helped me see better. That was noble to me.
 
Now you know my new set of favourite people? They are the ones who have chosen to dedicate their time to improving people's lives with open software. They come in different forms: open-source contributor/volunteer, maintainer, committer (I just learnt of this, courtesy of [Open Source Guide](https://opensource.guide/leadership-and-governance/)).
These people come together with the shared goal to build and improve software whose source code is available to everyone. As opposed to private proprietary software.



> _Read more on Open source vs Proprietary software [here](https://www.geeksforgeeks.org/difference-between-open-source-software-and-proprietary-software/)._

---

It is with joy that I share that I will get my first experience contributing to open-source for the next 3 months. Through the Outreachy internship, I was selected to work with HOTOSM from May to August 2024.

[Outreachy](https://www.outreachy.org/apply/) is a paid internship that supports underrepresented individuals in tech to contribute to open-source projects.
And [HOTOSM](https://www.hotosm.org/what-we-do.html), the organisation I will be working with uses open mapping for humanitarian purposes, providing map data to aid in disaster management, community development and the achievement of Sustainable Development Goals.

I have had a great first week with HOTOSM. I have received warm welcomes from my mentors, fellow intern and our coordinator. 

{% embed https://giphy.com/gifs/dccmakingtheteam-cmt-dallas-cowboys-cheerleaders-dcc-making-the-team-l3vRfAuz4tU2Svalq %}

This explains how I felt when I received the news that I was selected. I had put in a lot of effort during the contribution phase, but there were many contributors, so I wasn't sure about the outcome. I am incredibly grateful to have been selected, and I'm also thankful for going through the contribution phase because it taught me to concentrate on tasks and get things done, no matter how many people were working towards the same goal.

---

This is day 1 of forever making an impact through my work. I get to work on projects that will directly impact lives. I have long envisioned this and I am excited to begin.
My name is Oluwanifemi, and I am now among my favourite group of people 😊.

My core values are compassion and optimism.
I am driven by compassion for those in unfavourable conditions.

I also value optimism. I hope all things, I believe all things.
Some people describe me sometimes as one who puts their head in the clouds 😂 (I must add though that it is not to the point of being counterproductive. Just enough to help me dream lofty dreams).

> _Writing requires so much effort, so I will stop here for now. Stay tuned for more updates about my internship as I have so many things to share._
TLDR; Suspense in react-query
Tags: programming, react, reactnative, reactquery
Published: 2024-06-01 19:48:41

In React Query, Suspense is a way to handle loading states for asynchronous data fetching. It essentially lets your components "pause" until the data they need is available. For example if your data is bing fetched react loads a temporary component instead until the data becomes available.

> Note: Suspense requires React 18 or later.

## Without Suspense:

- You typically use a state variable (e.g., `isLoading`) to indicate if data is being fetched.
- You conditionally render loading indicators while the data is being fetched.
- This can lead to a lot of conditional logic and potentially messy code.

## With Suspense:

- Wrap your component in a Suspense boundary: This signals to React that your component might need to wait for data.
- Use `useQuery`: This hook fetches data asynchronously and provides information about the data fetching state (_loading_, _error_, _data_).
- React Query throws a promise: When data is being fetched, useQuery internally throws a promise. This "**suspends**" rendering.
- Suspense boundary catches the promise: The Suspense boundary catches the promise thrown by `useQuery` and renders a fallback component (e.g., a loading indicator) while the data is being fetched.
- Data arrives and rendering resumes: Once the promise resolves with the data, React continues rendering your component with the actual data.

### Benefits of Suspense:

- Cleaner code: You avoid repetitive conditional logic for loading states.
- Improved user experience: Users see a clear loading indicator while data is being fetched.

### React Query and Suspense work together seamlessly:

- React Query manages data fetching and provides the "suspending" behavior.
- You can use Suspense boundaries to handle loading states in a cleaner way.

<hr />

**Code example:**
https://tanstack.com/query/v5/docs/framework/react/examples/suspense
EP-1: WTF is Spring Boot?
Tags: java, springboot, beginners, webdev
Published: 2024-06-01 19:43:50

## The Man, The Myth, Not Thala, But Spring Boot
What make a java developer powerful? Obviously knowing how to write REST API. Having ability to talk to server by writing mere alphabets in your code editor is not less than having any superpower. In the world of Java, Its not the REDBULL which gives you wing, Its **Spring Boot** which gives you wings and let you fly high.
##  How to have super power
No individual born with power, people have to acquire it. If you want to have the super power of talking to server you need to go to a place in internet [start.spring.io](https://start.spring.io/). The virtual **pornhub ** for java developers.
**What it gives**
 - Boilerplate starter code for creating a basic spring boot application.
 - Standard project structure, Ensures your code can suck but not your project structure
 - Nothing else

![Snip of how start.spring.io looks like](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/913o5jralq22ou0tflnq.png)

If you hit on the GENERATE button one zip folder will magically get downloaded.
Unzip It, Open it with some of the world class IDE like Intellij Idea or VS code and hit on the Play button.

DONE, You have created your first Spring boot project.

Lets DIVE Deep on next Episode. 

Happy Booting.
Buy Xanax Online - Say Goodbye to Stress and Tension
Published: 2024-06-01 19:20:10

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Relaxation and Calmness Awaits
Published: 2024-06-01 19:19:38

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Selenium
Published: 2024-05-23 14:48:47

Selenium is a widely-used tool for automating web browsers, essential for anyone involved in web development and testing. It allows users to write scripts that interact with web applications just as a human would, performing tasks such as clicking buttons, filling out forms, and navigating pages. This capability makes Selenium invaluable for testing web applications, ensuring they function correctly across different browsers and platforms.

One of the primary reasons to use Selenium for automation is its ability to handle repetitive tasks efficiently. For example, suppose a developer needs to test a login form. Manually entering the username and password and clicking the login button every time can be time-consuming and prone to errors. With Selenium, a script can be written to automate this process, performing the task quickly and accurately each time. This automation not only saves time but also ensures consistency in testing.

Selenium supports multiple programming languages, including Python, Java, C#, and JavaScript, which makes it accessible to a broad range of developers. This flexibility allows teams to write tests in the language they are most comfortable with, integrating seamlessly into their existing development workflows. Additionally, Selenium is compatible with various browsers like Chrome, Firefox, Safari, and Internet Explorer, which is crucial for cross-browser testing.

For example, a quality assurance (QA) engineer can use Selenium to write a test script that opens a web application in multiple browsers, checks that all elements are displayed correctly, and verifies that all functionalities, like form submissions and navigation links, work as expected. This automated testing ensures that users will have a consistent and error-free experience regardless of the browser they use.
Buy Xanax Online - Worldwide Shipping for Your Convenience
Published: 2024-06-01 19:14:03

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Get 10% Off with Bitcoin Purchase
Published: 2024-06-01 19:13:33

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Instant Delivery within the US
Published: 2024-06-01 19:01:54

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Same Day Shipping Services Available
Published: 2024-06-01 19:01:25

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Fast Venmo Delivery for Quick Relief
Published: 2024-06-01 18:56:38

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.
Buy Xanax Online - Easy Payments with Zelle Option
Published: 2024-06-01 18:53:50

Click To buy:https://medxpharma.org/product/xanax-2mg/
Buy Xanax Online by using MedXpharma ,this is an online trusted delivery. Xanax is used to treat anxiety and panic disorders.Xanax affects the central nervous system  and calms the brain and nerves By increasing GABA Neurotransmitter writer. Buy Xanax online from the Medxpharma platform with safe transactions and reliable shipping. Trust  MedXpharma For your pharmacy Needs And Mind of experience.
Purpose of xanax Is used to treat anxiety disorders and anxiety is caused by depression.
The Advantage of xanax is used to relax the muscles and can produce feelings.
The Disadvantages of xanax are Dizziness,Insomnia,Fatigue,Confusion,Memory Problems,Seizures and Difficulty in concentrating.
Dosage For Adults:0.25 to 0.5 Milligrams (Mg) 3 times a day.your doctor may increase your as you need.
Dosage For Children:0.5 mg taken once a day.Your doctor can also increase the dose as you need.
Short term advantage of xanax can cause drowsiness and sedation.