Sponsor
Star

Created With



linkCore Concepts


linkJSX Translation

In Render-JSX, JSX is translated into renderer.create(). Assuming renderer in scope is an instance of a child class of Renderer, then for various operations (creating tagged nodes, leaf nodes, fragments, setting properties, appending nodes together, etc.) it will first go over its provided plugins, and default to some fallback behavior specified in the child class.

Learn More

linkRenderer / Plugin Reusability

A renderer masks the API of its context / environment, allowing the application code, components and the plugins to be context / environment agnostic. For example, a plugin for rendering callbags can be fully environment agnostic (except for example that the environment has a concept of life-cycle), meaning it would be usable both for DOM rendering or for rendering native UI.



    ╭────────────────────╮     ╭────────────────────╮         
    │                    │     │                    │         
    │                    │     │                    │         
    │        App         │────▶│     Components     │╶╶╶╶╶╶╶╶╮
    │                    │╶╮   │                    │        ╷
    │                    │ ╷   │                    │        ╷
    ╰────────────────────╯ ╷   ╰────────────────────╯        ╷
                │          ╷             ‌‌‌ │                  ╷
                │          ╷             ‌‌‌ │                  ╷
                ╰────╮     ╰╶╶╶╶╶╶╶╶╶╶╶╶╶ │ ╶╶╶╶╶╶╶╶╶╶╶╶╶╶╮  ╷
                     │                    │               ╷  ╷
      ╭────────────╮ │                    │               ╷  ╷
      │            │ ▼                    ▼               ╷  ╷
    ╭─│  Renderer  │────────────────────────────────╮     ╷  ╷
    │ │            │                                │     ╷  ╷
    │ ╰────────────╯                                │     ╷  ╷
    │                                               │     ╷  ╷
    │      ╭─────────────────────────────────╮      │     ╷  ╷
    │      │                                 │      │     ╷  ╷
    │      │                                 │            ╷  ╷
    │      │             Plugins             │╶╶╶╶╶╶╶╶╶╮  ╷  ╷
    │      │                                 │         ╷  ╷  ╷
    │      │                                 │      │  ╷  ╷  ╷
    │      ╰─────────────────────────────────╯      │  ╷  ╷  ╷
    │                       │                       │  ╷  ╷  ╷
    │                       │                       │  ╷  ╷  ╷
    │                       ▼                       │  ╷  ╷  ╷
    │      ╭─────────────────────────────────╮      │  ╷  ╷  ╷
    │      │                                 │      │  ╷  ╷  ╷
    │      │                                 │      │  ╷  ╷  ╷
    │      │          Base Renderer          │      │  ╷  ╷  ╷
    │      │                                 │      │  ╷  ╷  ╷
    │      │                                 │      │  ╷  ╷  ╷
    │      ╰─────────────────────────────────╯      │  ╷  ╷  ╷
    │                       │                       │  ╷  ╷  ╷
    │                       │                       │  ╷  ╷  ╷
    │                       │                       │  ╷  ╷  ╷
    ╰────────────────────── │ ──────────────────────╯  ╷  ╷  ╷
                            │                          ╷  ╷  ╷
                            │                          ╷  ╷  ╷
                            ▼                          ▽  ▽  ▽
╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮  ╭──╮
│  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  ╰──╯  │
│                                                              │
│                                                              │
│                    Environment / Context                     │
│                                                              │
│                                                              │



info NOTE

The application code, components and the plugins can directly utilize APIs of the environment (like DOM APIs), if they so choose to. In fact, in some situations, there is no other way. However this would mean that particular code would be aware of the environment / context and not usable in another one.

Core ConceptsJSX TranslationRenderer / Plugin Reusability

Home Overview Installation

Usagechevron_right

Usage Overview

DOM Renderingchevron_right
Custom Rendererschevron_right