Getting Started

Jet.js makes building web applications simpler.

Jet.js was inspired by React and JSX. Ideas of creating components as simple as JavaScript functions and using HTML tags inside JavaScript components have been widely accepted. That is why the approach of creating the components and working with hooks in Jet.js is very similar. Experienced React users may find it easy to adopt Jet.js.

In addition to being a simple library, it eliminates the requirement of creating a complex project’s structure with many dependencies.

Structure

Jet.js is a set of 6 packages:

  • jeta – Assert testing module.
  • jetc – compiler and development server, combines all components and dependencies into a single bundle and allows us to run a simple local server for development purposes.
  • jete – rendering engine, is responsible for running the application and making it interactive.
  • jeti – JSX interpreter, translates HTML tags into JavaScript for processing in the rendering engine.
  • jetr – Router and location, allows us to split and manipulate the application’s functionality based on the URL.
  • jetv – Vault, a pub/sub messaging service for cross components communication.

The main and only required package is jete – rendering engine. It renders components, serves hooks, runs effects, and updates DOM nodes. It contains everything required for a smooth and fast running application.

JSX Interpreter

Jet.js lets us create components as simple JavaScript functions that can include HTML tags. It has a built-in JSX interpreter to convert HTML into JavaScript.

The interpreter does not use templates. Instead, it seamlessly converts tags directly into JavaScript. This allows us to use additional logic in the UI presentation and leverage all JavaScript power to build UI.

The interpreter also translates an import statement to track and download the module’s dependencies. Start developing web applications without additional packaging or building steps.

Compiler

As the application grows, the number of files can increase significantly. Using many files means that the browser must download all of them one by one. It slows down the initial load and initialization of the webpage.

To optimize this, you can combine components from different files into one file – a bundle. The Jet.js compiler creates an optimized build where all components are included in the bundle.

Additional Tools

Working with Jet.js does not require additional packages or building tools. The library already includes the essentials required for building a web application.

Jet.js does not limit you from using various toolchains that are available for the JavaScript ecosystem. It is designed to be compatible with the major toolchains and easily integrate with them. Please refer to their documentation to learn how to connect these tools to your application.