-
Hi, I've just found your library, seems very nice as alternative to older solutions like handlebars. But a few problems appeared, not sure why. Firstly, if I try to import a tsx template file into a nodejs Then the I tried to add Secondly, the template file, was complaining about the lack of reactjs being included there, where in your docs, you dont mention that it is needed. Maybe I missed something. I then add reactjs and import it into the file Then I tried to preview the template, before I had added the reactjs as dependency. I got another error.
After adding the dependency it built. But when opening the page in the browser, the screen is empty with this error in the console. Can you help tell what I have done wrong? And why your docs do not mention certain things? Does it expect to be in a frontend project? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Thanks for giving it a try. This package is more for folks who are already familiar with React/JSX. I'd love to help you get up to speed but unfortunately I don't have the time. You might want to try using the plain JS project type. |
Beta Was this translation helpful? Give feedback.
-
I found why on the issues. For the preview, not sure what cause it to be fixed. I installed react-dom and it worked, then I removed it, and it continued working. For the import, it was a And for the |
Beta Was this translation helpful? Give feedback.
I found why on the issues.
For the preview, not sure what cause it to be fixed. I installed react-dom and it worked, then I removed it, and it continued working.
For the import, it was a
BiomeJS
rule auto enforcing it.And for the
render()
, it was because I wanted to have it in a.ts
file, but it needed to be in a.tsx
. Maybe there is a way, I dont know.