Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagooak committed Aug 27, 2024
1 parent ad250f6 commit 81f449c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# React Interactive ClojureScript

Displays highlighted ClojureScript that can be run in the browser

Uses [react-syntax-highlighter](https://github.com/react-syntax-highlighter/react-syntax-highlighter) and [eval-cljs](https://github.com/thiagooak/eval-cljs)

```sh
npm i react-interactive-cljs
```

```js
"use client"
import { CljsCodeBlock } from "react-interactive-cljs"

<CljsCodeBlock>{`(println "Hello")
(+ 2 2)`}</CljsCodeBlock>
```

The code above will render like the image below
![](before.png)

After clicking the "Run" button it will render like the image below
![](after.png)
Binary file added after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 81f449c

Please sign in to comment.