domco icon indicating copy to clipboard operation
domco copied to clipboard

React or JSX?

Open lassejlv opened this issue 1 year ago • 2 comments

Wil domco support react or jsx in the feature?

lassejlv avatar Sep 05 '24 09:09 lassejlv

Hi @lassejlv

I need to add some more examples to the docs or template to the create script.

You can use JSX and React with domco right now. If you used the create script, change your +server file to .jsx/.tsx extension and it will work using hono/jsx. Here's an example of what your +server file would look like: Hono JSX Usage

Remove the "jsxImportSource": "hono/jsx" from your tsconfig to default to React instead.

Here are steps to migrate an existing Vite + React app to use domco.

Let me know if that answers your question, thanks for your interest in the project!

rossrobino avatar Sep 05 '24 11:09 rossrobino

Hi, thanks for the help. It would be great with a template or docs about it. Keep up the good work 🙂

lassejlv avatar Sep 05 '24 12:09 lassejlv

I created a domco-examples repository, it shows some DIY and some SSR framework examples.

Here's a link to the react-router example with SSR in case you are still interested. Thanks again for the feedback!

rossrobino avatar Oct 16 '24 14:10 rossrobino