0.0.43 • Published 3 years ago

@jsx-lite/core v0.0.43

Weekly downloads
577
License
MIT
Repository
github
Last release
3 years ago

Why

Component libraries

Managing support for libraries that provide UI components across frameworks is a pain, esp when webcomponents are not an option (e.g. for server side rendering, best performance, etc). With JSX Lite you can write once, and run everywhere with full compatibilty

Modern workflows for all platforms

JSX lite allows you to incrementally adopt modern and familiar workflows for many different platforms, for for Shopify instance you can server side render to liquid and hydrate with React

JS framework fatigue

If you have ever had to migrate a huge codebase from one framework to another, it's an absolute nightmare. Writing at a higher level of abstraction allows you to move from one to another with ease

Design to code

With JSX lite, you can convert designs from Figma or Sketch and convert it to clean code for the framework of your choice. You can even use Builder.io to visually drag/drop to build UIs and edit the code side by side

How does it work

JSX Lite uses a static subset of JSX, inspired by Solid. This means we can parse it to a simple JSON structure that it is easy easy to build stringifers off of for various frameworks and implementations

export function MyComponent() {
  const state = useState({
    name: 'Steve',
  });

  return (
    <div>
      <input
        value={state.name}
        onChange={(e) => (state.name = e.target.value)}
      />
    </div>
  );
}

becomes:

{
  "@type": "@jsx-lite/component",
  "state": {
    "name": "Steve"
  },
  "nodes": [
    {
      "@type": "@jsx-lite/node",
      "name": "div",
      "children": [
        {
          "@type": "@jsx-lite/node",
          "bindings": {
            "value": "state.name",
            "onChange": "state.name = event.target.value"
          }
        }
      ]
    }
  ]
}

Which can be reserialized into many languges and framworks. For instance, to support angular, we just make a serializer that loops over the json and produces:

@Component({
  template: `
    <div>
      <input [value]="name" (change)="name = $event.target.value" />
    </div>
  `,
})
class MyComponent {
  name = 'Steve';
}

Adding framework support is surprisingly easy with our plugins (docs coming soon!)

No-code tooling

JSX Lite's static JSON format also enables no-code tooling for visual code editing and importing, for instance with Builder.io or Figma

Formatting options

JSX Lite supports settings for generating code to match your preferred formatting, libraries, etc. These output options will be customizable and extensible with plugins soon too

Who uses it

Status

FrameworkStatus
ReactAlpha
VueAlpha
LiquidAlpha
Builder.ioAlpha
SolidAlpha
FigmaAlpha
AngularAlpha
SvelteAlpha
HTML/CSS/JSAlpha
WebcomponentsAlpha
React NativeAlpha
SwiftUIExperimental

Coming soon

  • Stable (v1) release
  • Plugin API docs for custom syntaxes and extensions
  • VS code plugin
0.0.44-17

3 years ago

0.0.44-18

3 years ago

0.0.44-16

3 years ago

0.0.44-15

3 years ago

0.0.44-14

3 years ago

0.0.44-13

3 years ago

0.0.1-mono.2

3 years ago

0.0.44-12

3 years ago

0.0.44-11

3 years ago

0.0.1-mono

3 years ago

0.0.44-8

3 years ago

0.0.44-10

3 years ago

0.0.1-mono.1

3 years ago

0.0.44-7

3 years ago

0.0.44-6

3 years ago

0.0.44-5

3 years ago

0.0.44-4

3 years ago

0.0.44-3

3 years ago

0.0.44-2

3 years ago

0.0.43-0

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.44-0

3 years ago

0.0.44-1

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.39

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.33

3 years ago

0.0.32

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.27-0

3 years ago

0.0.26

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.20

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.4-37

3 years ago

0.0.4-36

3 years ago

0.0.4-35

3 years ago

0.0.4-34

3 years ago

0.0.4-33

3 years ago

0.0.4-32

3 years ago

0.0.4-31

3 years ago

0.0.4-30

3 years ago

0.0.4-29

3 years ago

0.0.4-28

3 years ago

0.0.4-27

3 years ago

0.0.4-26

3 years ago

0.0.4-25

3 years ago

0.0.4-24

3 years ago

0.0.4-23

3 years ago

0.0.4-22

3 years ago

0.0.4-21

3 years ago

0.0.4-19

3 years ago

0.0.4-20

3 years ago

0.0.4-18

3 years ago

0.0.4-17

3 years ago

0.0.4-16

3 years ago

0.0.4-15

3 years ago

0.0.4-14

3 years ago

0.0.4-13

3 years ago

0.0.4-12

3 years ago

0.0.4-11

3 years ago

0.0.4-10

3 years ago

0.0.4-9

3 years ago

0.0.4-8

3 years ago

0.0.4-7

3 years ago

0.0.4-6

3 years ago

0.0.4-5

3 years ago

0.0.4-4

3 years ago

0.0.4-3

3 years ago

0.0.4-2

3 years ago

0.0.4-1

3 years ago

0.0.4-0

3 years ago

0.0.3

3 years ago

0.0.3-4

3 years ago

0.0.3-3

3 years ago

0.0.3-2

3 years ago

0.0.3-1

3 years ago

0.0.3-0

3 years ago

0.0.2

3 years ago

0.0.2-3

3 years ago

0.0.2-2

3 years ago

0.0.2-1

3 years ago