prevwong / reka.js

💎 State management system to build any no-code editor
https://reka.js.org/
MIT License
611 stars 42 forks source link

Example 01-react: Preview Not Showing and TypeScript Error in Editor.tsx #136

Closed ylnsnv closed 9 months ago

ylnsnv commented 9 months ago

Issue Description

I'm encountering an issue with the 01-react example in the reka.js library. After cloning the repository and setting up the example as per the instructions (running npm install followed by npm run dev), I've noticed that the preview pane is not displaying any content. Additionally, there's a TypeScript error in the Editor.tsx component.

Steps to Reproduce

  1. Clone the reka.js repository.
  2. Navigate to examples/01-react.
  3. Run npm install to install dependencies.
  4. Run npm run dev to start the development server.
  5. Observe that the left side (code editor) works, but the preview pane on the right is empty.
  6. TypeScript error observed in Editor.tsx.

Expected Behavior

The preview pane should display the output corresponding to the code written in the editor.

Actual Behavior

The preview pane remains empty, regardless of the code entered in the editor.

TypeScript Error Details

Thanks in advance for any help and the great work with this amazing library! :)

ylnsnv commented 9 months ago

Another thing- It won't work from within the stackblitz.com that we get referred to from here as well...

@prevwong Any suggestion? :)

ylnsnv commented 9 months ago

I've been looking at the code and, it seems like the Renderer/index.tsx doesn't handle the type FragmentView and just returns null for that. I think this PR might be responsible for the error... Any thoughts? @prevwong

prevwong commented 9 months ago

Fixed in #137