The Victory lets us add charts and data visualization into our React app.
In this article, we’ll look at how to add charts into our React app with Nivo.
Nivo comes with code to let us add a Sankey diagram into our React app.
To install the required packages, we run:
npm i @nivo/sankey
Then we can create the diagram by writing:
import React from "react";
import { ResponsiveSankey } from "@nivo/sankey";const data = { nodes: [ { id: "John", color: "hsl(355, 70%, 50%)" }, { id: "Raoul", color: "hsl(276, 70%, 50%)" }, { id: "Jane", color: "hsl(331, 70%…
They say waking up every morning is a struggle, keeping your body in shape is a struggle, having a perfect diet is a struggle; but very few try to understand where is it all stemming from.
Fortunately, people have realized that they and other people may suffer from mental disorders such as anxiety, but unfortunately, the people who have realized that are very limited.
With the ongoing pandemic, talking about mental health has significantly increased but even during the current global crisis, people are hesitant to seek help or talk openly about it.
Globally it’s estimated that close to 300…
If you care to read it, the information in this article is pulled from a much larger piece I wrote (twenty-seven-minute read, to be exact) entitled “Thoughts on Dreaming Big (and why you should)”.
Be warned, it was but only the second article I wrote on Medium. Back then, my articles were riddled with expletives (without compelling enough reason to use them) and the writing makes me gag (doesn’t it always?).
I sure do hope there has been improvement!
Still, I think there is a lot of value in there if you care to read any more words I write.
…
Why are successful people weirdos?
Why are “geniuses”… weird?
I encourage you to ask yourself why it is you think such silly thoughts. I encourage you to define “weird”.
What makes something “weird”?
‘Well, something that isn’t normal,’ (you may say).
But what’s… “normal”, then?
Well, you’re normal, (you may think, once again). We are all normal; except for those weird guys and gals, you know, the ones out there living fulfilling lives and all.
Here’s what I think:
We have a tendency to place successful people so far outside ourselves into a realm we believe we cannot occupy.
We…
Fastify is a small Node framework for developing back end web apps.
In this article, we’ll look at how to create back end apps with Fastify.
We can throw various kinds of errors in our Fastify app.
For example, we can write:
const fastify = require('fastify')({})fastify.get('/' ,async () => {
throw new Error('error')
})const start = async () => {
try {
await fastify.listen(3000, '0.0.0.0')
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
}
start()
Then when we go to /
, we get a 500 response.
Fastify includes the following errors codes:
FST_ERR_BAD_URL
— The router received an…Fastify is a small Node framework for developing back end web apps.
In this article, we’ll look at how to create back end apps with Fastify.
We can use async functions with our route handlers and send responses with it.
For example, we can write:
const fastify = require('fastify')({})
const { promisify } = require('util');
const delay = promisify(setTimeout)fastify.get('/', async function (request, reply) {
await delay(200)
return { hello: 'world' }
})const start = async () => {
try {
await fastify.listen(3000, '0.0.0.0')
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
}
start()
We use an async function as…
We all know 2020 was a tough year for everyone. Most of the people lost their jobs and couldn’t find a new job. But if we don’t prepare for 2021 may be possible 2021 was a worse year than 2020. That is why we discussed some of the best online businesses in 2021 you need to start so you don’t lose your money and prepare for 2021.
The US unemployment rate is 47.2% percent which means people couldn’t find a job and these numbers are too high. These people lost their jobs because of the COVID-19 pandemic. …
In the software development world, practice makes perfect. Therefore, we should find as many ways to practice programming as possible. With free public APIs, we can practice programming by creating apps that use those APIs.
In this article, we’ll look at some practice project ideas that can use some of those APIs.
The Bhagavad Gita API lets us access the Bhagavad Gita text all in one place.
To access the API, we need to authenticate via OAuth.
Bhagavad Gita is one of the most important Hindu religious texts.
The British National Bibliography API lets us search for book information.
It…
In the software development world, practice makes perfect. Therefore, we should find as many ways to practice programming as possible. With free public APIs, we can practice programming by creating apps that use those APIs.
In this article, we’ll look at some practice project ideas that can use some of those APIs.
The Behance API is an API with various design data that we can use.
We can access it with an API key.
We can use its endpoints to get projects, users, creative fields, and collections.
It comes with a JS wrapper, PHP library, a Ruby package, and a…
Preact is a front end web framework that’s similar to React.
It’s smaller and less complex than React.
In this article, we’ll look at how to get started with front end development with Preact.
We can add class components as we do with React.
For example, we can write:
import { Component, render } from "preact";class Clock extends Component {
constructor() {
super();
this.state = { time: Date.now() };
} componentDidMount() {
this.timer = setInterval(() => {
this.setState({ time: Date.now() });
}, 1000);
} componentWillUnmount() {
clearInterval(this.timer);
} render() { const time = new Date(this.state.time).toLocaleTimeString(); return <span>{time}</span>; }…