I Built the Same App With React and Preact. Here are the differences

I Built the Same App With React and Preact. Here are the differences

Ever heard of Preact? It’s a React.js alternative that praises itself for being much smaller and therefore faster. Despite high compatibility to React.js.Let’s start with the differences when working with the two libraries, then we look at the app code & measure the performance.

Ever heard of Preact? It’s a React.js alternative that praises itself for being much smaller and therefore faster. Despite high compatibility to React.js.

I wondered how useful Preact really is, so I built the exact same app in React.js and Preact. Then I measured the size, differences, and performance of the two apps in a fair competition.

Let’s start with the differences when working with the two libraries, then we look at the app code & measure the performance. Have fun!

Creating a React project, and a Preact project

For React.js, this should be known already: npm install -g create-react-app and then create-react-app <project-name>, to start working in the project directory, just cd /<project-name> — there we go and we can start editing the files.

Let’s create the Preact project now: npm install -g preact-cli, then preact create default <project-name> — default is the name of the starter template, we are going to use.

javascript preact programming web-development reactjs

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

ReactJS Web App Development Services

We provide top-notch ReactJS development services to global clients. Hire expert ReactJS developers from top React JS development company, Skenix Infotech.

Why Web Development is Important for your Business

With the rapid development in technology, the old ways to do business have changed completely. A lot more advanced and developed ways are ...

Important Reasons to Hire a Professional Web Development Company

    You name the business and I will tell you how web development can help you promote your business. If it is a startup or you seeking some...

What Garbage Collection in JavaScript Is and How It Works

JavaScript values are allocated when things are created (objects, Strings, etc.) and freed automatically when they are no longer used. This process is called Garbage collection.

What Javascript Spread Operator is, How It Works and How to Use It

JavaScript spread operator is one of the more popular features that were introduced in ES6. This tutorial will help you understand it. You will learn what spread operator is and how it works. You will also learn how to use it to copy and merge arrays and object literals, insert data and more.