DEV Community

Banele1999
Banele1999

Posted on

1 1 1 1 1

Learn React with me

Today I start "The Ultimate React Course 2024: React, Redux & More" by Jonas Schmedtmann on Udemy. I will share a detailed blog post on everything I learned in the course.
Image description

import { useEffect, useState } from "react";

export default function App() {
  const [advice, setAdvice] = useState("");
  const [count, setCount] = useState(0);

  useEffect(function () {
    getAdvice();
  }, []);

  async function getAdvice() {
    const res = await fetch("https://api.adviceslip.com/advice");
    const data = await res.json();
    setAdvice(data.slip.advice);
    setCount((a) => a + 1);
  }

  return (
    <div>
      <h1>{advice}</h1>
      <button onClick={getAdvice}>Get Advice</button>
      <Message count={count} />
    </div>
  );
}

function Message(props) {
  <p>
    You have read <strong>{props.count}</strong> pieces of advice
  </p>;
}
_**

#### 


**_
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (5)

Collapse
 
brense profile image
Rense Bakker

Don't learn redux. If you want to learn state management in client-side rendered SPAs, learn something like Jotai or Zustand, but tbh managing global state on the client is no longer necessary since server-side rendering and react server components let you fetch the data you need on the server, without doing round trips and making a giant redux store on the client.

Collapse
 
banele1999 profile image
Banele1999

Thank you. I will look into that

Collapse
 
np03a170120 profile image
Season Shrestha

Can you also please, keep explanations. I want to learn too. Happy learning ❤️

we can stay connected, share learning
https://www.linkedin.com/in/season-shrestha-b11125207?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=ios_app

Collapse
 
banele1999 profile image
Banele1999

Hey.
I followed you on linkedin. Looking forward to learning with you
linkedin.com/in/banelempofu/

Collapse
 
random_ti profile image
Random

🔥💖

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay