/parenscript-react-examples

React examples in Parenscript

Primary LanguageCommon Lisp

Intro

These are the official React examples ported to Parenscript .

How to Run

You'll need SBCL and Quicklisp .

  1. Install Quicklisp and run (ql:quickload :parenscript) in your SBCL environment.

  2. Compile the Parenscript code. For example, to compile the basic example,

    ❯ sbcl --load psx.lisp --load ps-compile.lisp --eval '(ps-compile:batch-compile "examples/basic/package.lisp" "examples/basic/")'
    
  3. Load the corresponding index.html file in a modern browser.

About the PSX Syntax

psx.lisp implements a small syntax for Parenscript that is equivalent to JSX for Javascript. Codes written in PSX are ultimately transformed into React API calls. You can see it in action in the examples.

I got this idea (And the name, of course) from cl-react . And since I was just trying things out, I decided to build my own simpler wheels :)

License

MIT.