Why there is a difference of usage between the import statement and the require statement in different parts of the project directories using these frameworks, answered.

Image for post
Image for post
Photo by CHUTTERSNAP on Unsplash

I had always thought that JavaScript import and require statements to be more or less the same. When you want to use other components and functionalities from different files or modules, you would either import or require it to the file you are working on. The only difference between import and require statements, I thought, was due to the former being the ‘newer’ version of the latter. Nothing else.

My preconception was proved wrong…


Mercantilism gained tract in the late 16th century. We follow the story of how it came to be and its fall from grace as the main economic policy of that age. We end by asking whether mercantilism still exists in this modern world.

Image for post
Image for post
Photo by Dmitry Demidko on Unsplash

Mercantilism in Europe began in late 16th to early 17th century with the Dutch puzzle: how is it that a newborn nation with little to no natural resource managed to become one of the richest and most powerful state in Europe in a span of just a couple of decade? The United Provinces of the Netherlands or…


How to serve a React app using Express.js through server-side rendering

Image for post
Image for post
Photo by Science in HD on Unsplash

You have setup and created your react app (using create-react-app, other boilerplates, or even creating it from scratch). Now you’re trying to serve it to the web so people can experience your app. Sure, for easy deployment and minimal setup you can go for the already established platforms such as Netlify, Heroku, Firebase Hosting, Github Pages, or many others. This article, however, is not about that. This article is about setting up your own server and deploying your site/app using good ol’ Express.js.

Why, you may ask? For learning purposes, of course. Having an understanding of how servers deliver your…


How to serve a React app using Express.js by implementing client-side rendering solutions

Image for post
Image for post
Photo by Kate Townsend on Unsplash

You have setup and created your react app (using create-react-app, other boilerplates, or even creating it from scratch). Now you’re trying to serve it to the web so the world can see what you’ve made. Sure, for easy deployment and minimal setup you can go for the already established platforms such as Netlify, Heroku, Firebase Hosting, Github Pages, or many others. This article, however, is not about that. This article is about setting up your own server and deploying your site/app using good ol’ Express.js.

Why, you may ask? For learning purposes, of course. Having an understanding of how servers…


Building a React app from an empty directory using the latest Webpack and Babel.

Image for post
Image for post
Photo by Scott Blake on Unsplash

Nowadays, starting a React app is as simple as typing a line of command into the terminal, taking for granted what happens under the hood. We use create-react-app or other boilerplates to start the development process and dive straight into the actual React code.

However, it would be a great learning experience (especially for those who are beginners) to set up a react app from scratch on your own. It will cement your understanding of the bits and pieces that goes into a react application from scratch to deployment. …


Using Recoil.js library for state management in a Next.js application.

Image for post
Image for post
Photo by Markus Spiske on Unsplash

Intro

Keeping states between pages in a React application can be tricky. This article explains how to keep states persistent in a Next.js based React application using Recoil.js. Before reading this article, one should have a basic understanding of React.

Next.js is a React-based framework for building complete web applications. Next.js provides more functionalities (such as styling and routing solutions) than your typical create-react-app for faster and easier web app building.

As a react-based application, state management can be done using built-in state (setState or useState) and props, or context. …


How to solve the problem of persisting state between pages using Recoil library in a Gatsby site.

Image for post
Image for post
Photo by Kevin Ku on Unsplash

According to its official documentation, Recoil is “a state management library for React”. There are a couple of reasons why Recoil is best chosen to manage states in a react application rather than using React’s built-in state management capabilities (including context).

Gatsby, on the other hand, “is a React-based open source framework for creating websites and apps”. Building web application using Gatsby can be fast and easy. Inside the Gatsby application, state management can be handled using Recoil.js.

The Problem

Integrating Recoil in an existing React application, according to its documentation, is simple enough. After installing the Recoil package using either npm


Image for post
Image for post
Photo by: Akira Hojo — Unsplash

Dalam dunia akuntansi, kita mengenal adanya suatu kerangka konseptual akuntansi. Tulisan ini merupkan bagian pertama dari rangkaian tulisan yang akan mengupas tuntas mengenai kerangka konseptual akuntansi. Pembahasan mengenai kerangka konseptual akan dibagi menjadi beberapa tulisan dan tulisan kali ini akan membahas tentang definisi kerangka konseptual, mengapa kerangka konseptual dibutuhkan, perkembangan kerangka konseptual dari waktu ke waktu, serta adopsi kerangka konseptual di indonesia, yang dijelaskan menggunakan bahasa yang sesederhana mungkin.

Apa itu Kerangka Konseptual Akuntansi?

Menurut Kieso, Weygandt, dan Warfield, suatu kerangka konseptual “establishes the concepts that underlie financial reporting”. Sementara, di dalam Conceptual Framework for Financial Reporting 2018 dijelaskan bahwa: “The Conceptual Framework for Financial…

Putra Aryotama

I write for fun! I write about my field of work (tax, accounting, and economics) and hobby (programming, javascript, react). Sometimes in Indo, usually in Eng

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store