observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.13k stars 85 forks source link

jsx not rendering #1444

Closed renenadorp closed 3 weeks ago

renenadorp commented 3 weeks ago

Hi, I'm following this example from the Framework documentation:

function Greeting({subject}) {
  return <div>Hello, <b>{subject}</b>!</div>
}

and then

display(<Greeting subject="JSX" />);

Unfortunately jsx code blocks are not executed, but are returned as code blocks:

image

Any idea what I could be doing wrong?

The complete markdown file is added here below:

test2.md

mbostock commented 3 weeks ago

This feature is marked as prerelease. Unless you are using the top-of-trunk version by cloning this repo and building Framework yourself, it won’t work. It will be released soon as version 1.9.0. Glad you’re excited to try it out!

mbostock commented 2 weeks ago

Framework 1.9.0 is now released! You can create a new project as:

npm exec @observablehq/framework@latest create