How to use Axios with React

How to use Axios with React

18 November 20235 min readWeb Programming

Axios is not a part of React; it can be used with any frontend framework. Axios is not your only option, but it is certainly one of the most popular. You can customize it according to your project's needs by using each of Axios's fundamental HTTP methods. Axios is a popular JavaScript library used for making HTTP requests from a browser or Node.js. It supports promises and can be used with async/await syntax. It is often used with React applications to fetch data from APIs. To use Axios in a React project, you first need to install it. You can do this using npm or yarn. Open your terminal and run:

npm install axios

or

yarn add axios

Once Axios is installed, you can use it in your React components.

CREATE (POST) example

import React, { useState } from "react";
import axios from "axios";

const CreateWithCustomAxios = () => {
  const [newData, setNewData] = useState({
    title: "New Title",
    body: "New Body",
  });
  const [createdData, setCreatedData] = useState(null);
  const [error, setError] = useState(null);

  const customAxios = axios.create({
    baseURL: "https://jsonplaceholder.typicode.com",
    headers: {
      "Content-Type": "application/json",
    },
  });

  const handleCreateRequest = async () => {
    try {
      const response = await customAxios.post("/posts", newData);
      setCreatedData(response.data);
    } catch (error) {
      setError(error);
    }
  };

  return (
    <div>
      <h2>Create with Custom Axios Example</h2>
      <label>Title: </label>
      <input
        type="text"
        value={newData.title}
        onChange={(e) => setNewData({ ...newData, title: e.target.value })}
      />
      <br />
      <label>Body: </label>
      <textarea
        value={newData.body}
        onChange={(e) => setNewData({ ...newData, body: e.target.value })}
      />
      <br />
      <button onClick={handleCreateRequest}>Create Data</button>

      {createdData && (
        <div>
          <h3>Created Data</h3>
          <p>Title: {createdData.title}</p>
          <p>Body: {createdData.body}</p>
        </div>
      )}

      {error && <p>Error: {error.message}</p>}
    </div>
  );
};

export default CreateWithCustomAxios;

In this example, a custom Axios instance is created using axios.create, and a POST request is made using this custom instance. Upon receiving a successful response in the try block, the created data is retrieved from response.data and the state is updated using setCreatedData. If an error occurs, the catch block is executed, and the error state is updated. Both the created data and the error state are displayed to the user.

This example illustrates a typical scenario of using a custom Axios instance while performing a CREATE (POST) operation.

POST Request Example:

import React, { useState } from "react";
import axios from "axios";

const PostExample = () => {
  const [postData, setPostData] = useState({
    title: "New Title",
    body: "New Body",
  });

  const handlePostRequest = async () => {
    try {
      const response = await axios.post(
        "https://jsonplaceholder.typicode.com/posts",
        postData,
      );
      console.log("Post response:", response.data);
    } catch (error) {
      console.error("Error making POST request:", error);
    }
  };

  return (
    <div>
      <h2>POST Request Example</h2>
      <label>Title: </label>
      <input
        type="text"
        value={postData.title}
        onChange={(e) => setPostData({ ...postData, title: e.target.value })}
      />
      <br />
      <label>Body: </label>
      <textarea
        value={postData.body}
        onChange={(e) => setPostData({ ...postData, body: e.target.value })}
      />
      <br />
      <button onClick={handlePostRequest}>Make POST Request</button>
    </div>
  );
};

export default PostExample;

POST Request Example: It makes a POST request with the data entered in the user form (postData). In the try block, a POST request is made using Axios's post method. If successful, the received data is retrieved from response.data and printed to the console. In case of an error, the catch block is executed, and the error is printed to the console.

PUT Request Example

import React, { useState } from "react";
import axios from "axios";

const PutExample = () => {
  const [putData, setPutData] = useState({
    id: 1, // Specify the ID of the record to be updated
    title: "Updated Title",
    body: "Updated Body",
  });

  const handlePutRequest = async () => {
    try {
      const apiUrl = `https://jsonplaceholder.typicode.com/posts/${putData.id}`;
      const response = await axios.put(apiUrl, putData);
      console.log("Put response:", response.data);
    } catch (error) {
      console.error("Error making PUT request:", error);
    }
  };

  return (
    <div>
      <h2>PUT Request Example</h2>
      <label>Title: </label>
      <input
        type="text"
        value={putData.title}
        onChange={(e) => setPutData({ ...putData, title: e.target.value })}
      />
      <br />
      <label>Body: </label>
      <textarea
        value={putData.body}
        onChange={(e) => setPutData({ ...putData, body: e.target.value })}
      />
      <br />
      <button onClick={handlePutRequest}>Make PUT Request</button>
    </div>
  );
};

export default PutExample;

PUT Request Example: It makes a PUT request with the data updated by the user (putData). In the try block, a PUT request is made using Axios's put method. If successful, the received data is retrieved from response.data and printed to the console. In case of an error, the catch block is executed, and the error is printed to the console.

DELETE Request Example:

import React, { useState } from "react";
import axios from "axios";

const DeleteExample = () => {
  const [postId, setPostId] = useState(1);

  const handleDeleteRequest = async () => {
    try {
      const apiUrl = `https://jsonplaceholder.typicode.com/posts/${postId}`;
      const response = await axios.delete(apiUrl);
      console.log("Delete response:", response.data);
    } catch (error) {
      console.error("Error making DELETE request:", error);
    }
  };

  return (
    <div>
      <h2>DELETE Request Example</h2>
      <label>Post ID: </label>
      <input
        type="number"
        value={postId}
        onChange={(e) => setPostId(e.target.value)}
      />
      <br />
      <button onClick={handleDeleteRequest}>Make DELETE Request</button>
    </div>
  );
};

export default DeleteExample;

DELETE Request Example: It makes a DELETE request with the ID entered by the user. In the try block, a DELETE request is made using Axios's delete method. If successful, the received data is retrieved from response.data and printed to the console. In case of an error, the catch block is executed, and the error is printed to the console.

These examples involve performing different HTTP requests using the Axios library. The try and catch blocks help to check if the request is successful and provide an appropriate response in case of an error. This is a typical JavaScript/React pattern for handling asynchronous operations and dealing with errors.

The Killer

The Killer

17 November 20232 min readCinema

I watched this movie last night. I waited a long time for the movie to come out. The reason why I put this movie on my waiting list is, of course, the director David Fincher's work is very good. The fact that David Fincher is the director of great films such as Fight Club, Seven, The Game and The Social Network shows that he is a quality filmmaker. Therefore, one inevitably has expectations for a new movie of his.

Yes, I watched the movie with great pleasure last night. It was one of the beautiful movies I watched recently because good movies cannot be produced lately. Therefore, the people who create such quality films deserve all the praise. It is very sad for humanity that neither quality films nor TV series have been produced lately. Wouldn't it be nice if there were TV series that were better than Game of Thrones and better than Breaking Bad?

It's a much better movie than the movies on the market. You can see people who didn't like the movie because people had high expectations from it. Therefore, they could not find what they wanted in the movie. They make comments like the script is not good, boring and not predictable. The script could have been a little better, but I can still say it was adequate. Although it's not a very good movie, it's not a bad movie either. I think the movie is good. The director is good, the actor is good. Michael Fassbender did a great job as always.

onurtaskiran

Storyline:

After a fateful near miss, an assassin battles his employers — and himself — on an international hunt for retribution he insists isn't personal.

React Suspense

React Suspense

15 November 20232 min readWeb Programming

React Suspense is a powerful tool that can be used to enhance React applications for better performance and better user experience. To lazily load our components or incrementally load our application, we use a tool called suspense. React Suspense is a feature that allows React applications to better handle asynchronous operations. It is often used for data loading, code loading and other asynchronous operations. React Suspense is ideal for improving user experience and improving application performance.

React.lazy() is a function used to manage dynamically loaded components. This feature alleviates the initial loading of the application and ensures that it is loaded only when the component is needed. It is often used in conjunction with the "code splitting" strategy.

A simple example:

import React, { Suspense, lazy } from "react";

const SlowComponent = lazy(() => import("./SlowComponent"));

function App() {
  return (
    <div>
      <h1>React Suspense Example</h1>
      <Suspense fallback={<div>Loading...</div>}>
        <SlowComponent />
      </Suspense>
    </div>
  );
}

export default App;

In the example above, the Suspense component shows "Loading..." while waiting for the SlowComponent loaded with React.lazy().

Let's look at another example.

Let's consider a social media application where we will use React Suspense to asynchronously load a user's profile and posts.

import React, { Suspense } from "react";

// Function to asynchronously load user profile data
const fetchUserProfile = () => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({ name: "John Doe", username: "johndoe" });
    }, 2000);
  });
};

// Function to asynchronously load user posts
const fetchUserPosts = () => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve([
        { id: 1, text: "Hello, this is my first post!" },
        { id: 2, text: "Writing code with React Suspense is awesome!" },
      ]);
    }, 3000);
  });
};

const Profile = React.lazy(() => import("./Profile"));
const Posts = React.lazy(() => import("./Posts"));

function App() {
  return (
    <div>
      <h1>Social Media App</h1>
      <Suspense fallback={<div>Loading...</div>}>
        <section>
          <h2>Profile</h2>
          <Profile />
        </section>
        <section>
          <h2>Posts</h2>
          <Posts />
        </section>
      </Suspense>
    </div>
  );
}

export default App;

In this example, the Profile and Posts components are dynamically loaded, and user profile and posts are asynchronously loaded. The Suspense component displays a "Loading..." indicator while the data is loading. This example demonstrates fetching data from different sources and using React Suspense to enhance the user experience.

React useTransition Hook

React useTransition Hook

14 November 20233 min readWeb Programming

React is fast by default. So the useTransition hook has specific use cases and is probably not something you will use in all your applications. useTransition hook is a hook available in React 18 and above and is used to manage asynchronous operations. This hook is designed to provide better performance and faster user experience, especially in large and complex applications. Thus, the user interface does not freeze and user interaction is not hindered.

In the example below, when you click the button, 50 000 items are added to the "items" array and these items are displayed as "div" elements containing the "☠️" symbol.

import React, { useState } from "react";

function App() {
  const [items, setItems] = useState([]);
  const addItem = () => {
    const newItems = Array.from({ length: 50000 }, (_, index) => {
      return (
        <div key={index}>
          <p>☠️</p>
        </div>
      );
    });
    setItems(newItems);
  };

  return (
    <div>
      <button onClick={addItem}>Add Item</button>
      {items}
    </div>
  );
}

export default App;

It will run very slowly. It will take a long time for them to appear on the screen.

Now let's do our example with the useTransition hook

import React, { useState, useTransition } from "react";

function App() {
  const [items, setItems] = useState([]);
  const [isAdding, startAdding] = useTransition();

  const addItem = () => {
    startAdding(() => {
      const newItems = Array.from({ length: 50000 }, (_, index) => {
        return (
          <div key={index}>
            <p>☠️</p>
          </div>
        );
      });

      setItems(newItems);
    });
  };

  return (
    <div>
      <button onClick={addItem}>Add Item</button>
      {isAdding ? <p>Adding items...</p> : items}
    </div>
  );
}

export default App;

In this example, we saw how React can handle large batch updates without blocking the main thread. Migration helps React prioritize rebuild updates, making it more responsive to user interactions.

The purpose of this code is to showcase how concurrent mode can be used to handle large batch updates to the UI without blocking the main thread, making the application more responsive to user interactions. The transition helps avoid UI jank by allowing React to prioritize rendering updates.

we use the useTransition hook to manage the addition of items to the "items" array. When you initiate the addition, a transition sequence is used to add items to the array. The variable "isAdding" is used to control whether the transition is ongoing. If the addition is in progress, you'll see the "Adding items..." message; otherwise, the added items are rendered.

This provides a better user experience for situations that involve larger operations and UI updates.

The Hateful Eight

The Hateful Eight

13 November 20232 min readCinema

I can say it's Quentin Tarantino's Best Movie. I would definitely put The Hateful Eight or Pulp Fiction first. This movie may not appeal to everyone's taste, but it is a very Under rated movie. It's actually a very, very good movie. Every scene is magnificent. I think Tarantino gives me my expectations from the movie. Do you know how I watched this movie? I watched this movie without knowing it was Tarantino's movie. And no matter what, I watched a random movie just to watch it. It was one of the movies I watched to distract myself on a day when I was careless. At the beginning of the movie, I didn't pay attention to who the director was and who the actors were. I was surprised as the movie progressed, and my surprise ended when I saw that it was a Tarantino movie at the end.

The Hateful Eight Movie does not have as much action as Django, but it has a very different atmosphere. Yes, the movie is very long and moves slowly, but the movie makes you lose track of time.

onurtaskiran

Storyline:

Some time after the Civil War, a stagecoach hurtles through the wintry Wyoming landscape. Bounty hunter John Ruth and his fugitive captive Daisy Domergue race towards the town of Red Rock, where Ruth will bring Daisy to justice. Along the road, they encounter Major Marquis Warren (an infamous bounty hunter) and Chris Mannix (a man who claims to be Red Rock's new sheriff). Lost in a blizzard, the bunch seeks refuge at Minnie's Haberdashery. When they arrive they are greeted by unfamiliar faces: Bob, who claims to be taking care of the place while Minnie is gone; Oswaldo Mobray, the hangman of Red Rock; Joe Gage, a cow puncher; and confederate general Sanford Smithers. As the storm overtakes the mountainside, the eight travelers come to learn that they might not make it to Red Rock after all

React useMemo Hook

React useMemo Hook

29 September 20234 min readWeb Programming

React's useMemo hook is a hook used to optimize computationally expensive operations. The way useMemo works is very similar to use callback. The difference between useCallback and use memo is that it stores the value we get back from the function. So UseCallback is used to memorize a function, UseMemo is used to memorize a value.

useMemo is often used to cache the results of computationally expensive operations and update them only when necessary. This can improve performance, especially when working with large lists of data or complex operations. However, excessive use can also negatively affect performance, so we should use it with caution.

The useMemo function takes two main parameters: The first parameter is a function that contains a value or action to be calculated. This function calculates and returns the result. The second parameter is the dependency array. This array specifies which variables or props have changed. If the dependency string changes, useMemo performs a new calculation. If the dependency string is not changed, the previous result is used from the cache.

Example:

import React, { useState } from "react";

const ExampleComponent = ({ data }) => {
  const calculateTotal = (data) => {
    console.log("Calculating total...");
    return data.reduce((acc, item) => acc + item, 0);
  };

  const total = calculateTotal(data);

  return (
    <div>
      <h2>Data List:</h2>
      <ul>
        {data.map((item, index) => (
          <li key={index}>{item}</li>
        ))}
      </ul>
      <div>Total: {total}</div>
    </div>
  );
};

const App = () => {
  const [data, setData] = useState([1, 2, 3, 4, 5]);

  return (
    <div>
      <h1>Without useMemo for Total</h1>
      <button
        onClick={() => setData([...data, Math.floor(Math.random() * 10)])}>
        Add Random Number
      </button>
      <ExampleComponent data={data} />
    </div>
  );
};

export default App;

In this example, the ExampleComponent component calculates the sum of the data at each render time without using useMemo. That is, the total is recalculated each time the data array is updated. Since useMemo is not used, unnecessary recalculations may occur. Using useMemo improves performance to prevent such situations.

Now let's do the example with useMemo

import React, { useState, useMemo } from "react";

const ExampleComponent = ({ data }) => {
  const calculateTotal = (data) => {
    console.log("Calculating total...");
    return data.reduce((acc, item) => acc + item, 0);
  };

  const total = useMemo(() => calculateTotal(data), [data]);

  return (
    <div>
      <h2>Data List:</h2>
      <ul>
        {data.map((item, index) => (
          <li key={index}>{item}</li>
        ))}
      </ul>
      <div>Total: {total}</div>
    </div>
  );
};

const App = () => {
  const [data, setData] = useState([1, 2, 3, 4, 5]);

  return (
    <div>
      <h1>Using useMemo for Total</h1>
      <button
        onClick={() => setData([...data, Math.floor(Math.random() * 10)])}>
        Add Random Number
      </button>
      <ExampleComponent data={data} />
    </div>
  );
};

export default App;

In this example, the ExampleComponent component takes an array of data and calculates the sum of that data. Using useMemo recalculates the sum only when the data array changes. This improves performance and recalculation of the sum when the data array is updated.

Now let's do an example that calculates the square of a number entered into an input box by the user.

import React, { useState, useMemo } from "react";

function SquareCalculator() {
  const [inputValue, setInputValue] = useState(0);

  // Using useMemo to memoize the square calculation
  const square = useMemo(() => {
    console.log("Square calculated!");
    return inputValue * inputValue;
  }, [inputValue]); // inputValue is specified as a dependency

  return (
    <div>
      <input
        type="number"
        value={inputValue}
        onChange={(e) => setInputValue(Number(e.target.value))}
      />
      <p>Input Value: {inputValue}</p>
      <p>Square Result: {square}</p>
    </div>
  );
}

function App() {
  return (
    <div>
      <h1>Square Calculator</h1>
      <SquareCalculator />
    </div>
  );
}

export default App;

In the example above, the SquareCalculator component allows the user to input a number. The square of the entered number is calculated using useMemo, and this calculation only occurs when the inputValue changes. The dependency array includes inputValue, so the calculation of the square only happens when the user input changes, and "Square calculated!" is printed to the console.

This allows for calculation only when necessary, instead of performing a new square calculation at each step, improving performance for the user.

React UseCallback Hook

React UseCallback Hook

24 September 20233 min readWeb Programming

In React, we may sometimes experience slowdown problems due to unnecessary component renderings. There are many ways to solve these problems in React. We do not use UseCallback very often in our projects, but when we do, our application is much better in terms of performance. useCallback hook is a hook used to optimize performance and memory usage in React applications. useCallback is specifically used to prevent functions from being created repeatedly. This is especially beneficial from a performance perspective because it reduces unnecessary function creations and re-rendering. In useCallback, we enter a dependencies array, just like in useEffect. If the dependencies array we entered changes, then the function is recalculated.

The basic usage of useCallback is as follows:

const memoizedCallback = useCallback(() => {
  // Define the function's tasks here
}, [dependencies]);

A simple example:

import React, { useState, useCallback } from "react";

const MyComponent = () => {
  const [count, setCount] = useState(0);

  const increment = useCallback(() => {
    setCount(count + 1);
  }, [count]);

  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={increment}>Increment</button>
    </div>
  );
};

export default MyComponent;

In this example, if the component is re-rendered when count changes, the increment function is also recreated. Thanks to useCallback, the increment function is only recreated when count changes, otherwise it is stored in memory.

An advanced example

Here's an example using useCallback for the To-Do List app. This example allows you to add new items and delete items to the To-Do List.

import React, { useState, useCallback } from "react";

const TodoItem = ({ id, text, onDelete }) => {
  const handleDelete = useCallback(() => {
    onDelete(id);
  }, [id, onDelete]);

  return (
    <div>
      <span>{text}</span>
      <button onClick={handleDelete}>Sil</button>
    </div>
  );
};

const UseCallback = () => {
  const [todos, setTodos] = useState([]);
  const [newTodo, setNewTodo] = useState("");

  const addTodo = useCallback(() => {
    if (newTodo) {
      setTodos((prevTodos) => [
        ...prevTodos,
        { id: Date.now(), text: newTodo },
      ]);
      setNewTodo("");
    }
  }, [newTodo]);

  const deleteTodo = useCallback((todoId) => {
    setTodos((prevTodos) => prevTodos.filter((todo) => todo.id !== todoId));
  }, []);

  return (
    <div>
      <h1>To do list</h1>
      <input
        type="text"
        value={newTodo}
        onChange={(e) => setNewTodo(e.target.value)}
      />
      <button onClick={addTodo}>Ekle</button>
      <div>
        {todos.map((todo) => (
          <TodoItem
            key={todo.id}
            id={todo.id}
            text={todo.text}
            onDelete={deleteTodo}
          />
        ))}
      </div>
    </div>
  );
};

export default UseCallback;

In this example, the TodoItem component represents each to-do item. TodoItem deletes an item using the onDelete callback. The TodoList component manages the to-do list, adding new items and deleting items. Prevents unnecessary re-creation of useCallback, handleDelete, addTodo and deleteTodo functions.

This example shows how useCallback can be used to add and delete items in a to-do list application.

Better Call Saul

Better Call Saul

22 September 20232 min readCinema

I just watched all the episodes of the series. It's a pretty good series. I got bored while watching the first season, but the series gets better in the later episodes. As you know, the series is a sequel to Breaking Bad. That's why I wanted to watch the series. Also, one of the biggest reasons why I watch the series is the character Mike Ehrmantraut. Jonathan Banks is a terrific actor. He reflected the character very well. I also liked her acting while watching the TV series Breaking Bad.

Many people say that this series is better than Breaking Bad, but I disagree. The series is like Breaking Bad, but not better. Better Call Saul is a good series, but to say it is better than Breaking Bad would be nonsense.

The characters of Nacho Varga and Lalo Salamanca were also very good in the series. Only a better scenario could have been written for the character of Nacho Varga.

If you are a Breaking Bad fan, you should definitely watch this series. I hope such TV series will be produced in the coming years.

onurtaskiran

Storyline

"Better Call Saul" serves as a prequel to "Breaking Bad," and it revolves around the transformation of Jimmy McGill, an attorney in Albuquerque. Initially aspiring to a legitimate legal career, Jimmy is drawn into the criminal underworld, ultimately adopting the persona of "Saul Goodman." The series also explores the rise of Mike Ehrmantraut, a former cop turned criminal fixer. It delves deep into the moral complexities of its characters and the intricacies of the legal world.

Best VSCode Themes

Best VSCode Themes

14 September 20235 min readWeb Programming

I'm talking about the themes I use in VSCode, so in my opinion, these are the best themes. The themes I mentioned below are the best themes I have ever enjoyed using. Sometimes it's good to change themes while writing code because change is always good. Sometimes changing themes motivates me while writing code. So, I feel in a different atmosphere while writing code.

I do not share themes with different designs here. Therefore, there may be similarities between themes. So in short, these are the themes I've been using lately. There may be a theme among them that you like. So enjoy.

onurtaskiran

GitHub Dark Default

If you like Github's own themes, you can use them. I used this theme for a long time. pretty good. It does not tire the eyes and the color selection is good. It has been downloaded more than 9 million times to date. A popular choice among developers. It has been appreciated by most software developers.

onurtaskiran

Night Owl

One of the themes I like is the Night Owl theme. Designed for night workers. It really doesn't tire the eyes. I don't like the color purple, but purple can sometimes look nice in code themes. Yes, the colors look really nice in this theme too. It is a popular theme among developers. It has been downloaded more than 2 million times.

About the theme: A Visual Studio Code theme for the night owls out there. Fine-tuned for those of us who like to code late into the night. Color choices have taken into consideration what is accessible to people with colorblindness and in low-light circumstances. Decisions were also based on meaningful contrast for reading comprehension and for optimal razzle dazzle.

onurtaskiran

Ariake Dark

This theme has a different atmosphere. It wasn't downloaded very much. It is a theme that I enjoy using. So, it has an atmosphere that attracts people. It is also the theme I am currently using.

About the theme: Ariake Dark color theme for Visual Studio Code This is (a bit customized) port of Ariake Dark Syntax theme made by @pathtrk Ariake is an atom syntax theme inspired by Japanese traditional colors and the poetry composed 1000 years ago.

onurtaskiran

CyberPunk

There are a lot of purple colors available in this theme. I used it for a very short time. I switched to this theme when I got bored with other themes. It's not good compared to the themes I use. It seems like something is missing in this theme. Would I use it again? If I get bored, maybe I can use it for a short time.

About the theme: I know, it may look like a rainbow and even give the sensation of distraction. But fundamentally I chose the cyberpunk theme, because it allows me to use a very wide color palette, this helps each fragment of code to have practically a color, so our eye quickly detects color changes and our brain is processing and memorizing the information received. This can help unconsciously improve your productivity when programming, as we recognize quickly, for example: if it is an object, a class, a method, etc...

onurtaskiran

Panda Syntax

One of my favorite themes is Panda Syntax. I used it for a long time. I recommend it, it has nice colors

About the theme: A Superminimal, dark Syntax Theme. This is the latest version of the Panda Syntax theme. It's a dark syntax theme crafted especially for Visual Studio Code [New Version], with subtle colors that are meant to be easy on the eyes.

onurtaskiran

Moonlight 2

Yes, this is one of my favorite themes, like Night Owl. It helped me focus better on the code.

onurtaskiran

Mayukai Mono

Oh yes, this is my favorite theme. I can put this first among the themes I use. I loved the colors. I don't use it now but I used it for a very long time.

About the theme: Mayukai Theme is dark and yellow bluish mirage theme with bright colors for easy readibility syntax. This theme is inspired from mixed color swatch in Ayu Theme, Material Theme, Monokai, Andromeda, and Gruvbox Darktooth Original Colors. These color are adjusted in Mayukai theme so it suitable for all day long programming work. This theme also included with built-in File Icon Theme called Mayukai Ayu.

onurtaskiran

Material Theme Palenight High Contrast

One of the themes I like is Material theme. I used it for a long time. It has been downloaded more than 2 million times. Popular among developers.

onurtaskiran

Cobalt Next Dark

I also used this for a short time. interesting theme. It was beautiful in everything, but the green color tone was not beautiful. It hasn't been downloaded very much, but it's beautiful anyway. I may use it again in the future.

onurtaskiran

Tokyo Night

The atmosphere of the Night Owl theme is also present in this theme. There is little difference between the Moonlight 2 theme. It is among the popular themes among developers. It has been downloaded more than 1 million times.

About the theme: A clean Visual Studio Code theme that celebrates the lights of Downtown Tokyo at night.

Yes, as I said, I am not introducing different themes here, I am just sharing the ones I prefer the most. I've used them all and liked most of them. If there are any you haven't used, you can try them. I advise. Happy coding.

Black Sails

Black Sails

10 September 20233 min readCinema

I generally like period movies and TV series. Black Sails is one of the productions that best reflects its period. Costume design, set design, ships, etc. in the series. All extremely well done. The acting is very believable and quite good, especially Flint's acting is very good. This series was one where I felt like I was watching Pirates of the Caribbean.

While the series gradually explains the evil of Captain Flint, it also tells how John Silver, one of the interesting characters, gradually became a Pirate. The first season moves slowly. Keep watching even if you get bored and think of quitting. In the following episodes, the series reaches much better levels in terms of subject and shooting. Sometimes an episode can even have the quality of a movie.

There are people who have never heard of Black Sails. I think the value of the series is not understood enough because the effort and high-quality acting do not deserve so little attention.

Yes, I watched this series years ago. I think I'm longing for a series like this. If you are interested in a series full of historical adventure, pirates, political intrigue and complex characters, you should watch Black Sails, one of the best productions.

onurtaskiran

The music of the series is also great. I listen from time to time.

Storyline "Black Sails" is a television series that originally aired from January 2014 to April 2017. It is a historical adventure television series created by Jonathan E. Steinberg and Robert Levine. The show is a prequel to Robert Louis Stevenson's novel "Treasure Island."

The series is set in the early 18th century and follows the story of Captain Flint, a feared pirate captain, and his crew as they navigate the dangerous waters of the Caribbean, dealing with rival pirates, British naval forces, and political intrigues.

"Black Sails" combines elements of historical fiction and adventure, providing a gritty and realistic portrayal of pirate life during the golden age of piracy. The show explores themes of power, ambition, loyalty, and the blurred lines between piracy and politics.

The main characters include Captain Flint, John Silver, Eleanor Guthrie, Charles Vane, and many others, each with their own motivations and goals within the pirate world.

The show received critical acclaim for its storytelling, characters, and production values, garnering a dedicated fan base during its run.