renderToString in Elysia BFF Layer
Random question, I have a Solid SPA with a BFF server (implemented using Elysia) -- so this is not Solid Start. This all lives under a single repository with the following root, high-level structure:
I am in the process of integrating an email verification feature in my Elysia server. I am sending the email using Resend like so:
The question I have is related to that
I put my component in a separate module within my Elysia BFF layer and imported the
This is my first time doing something like this and not sure what the proper way to do it is. A few thoughts:
- Why the heck is
- Is this the way I should be doing things? Am I allowed to have the convenience of using a component here?
- If it is possible, what do I need to be aware of when it comes to bundling the server now that I have a SolidJS component living there when I didn't have any before?
Appreciate any input and insights here.
I am in the process of integrating an email verification feature in my Elysia server. I am sending the email using Resend like so:
The question I have is related to that
html field. I would like to use a SolidJS component to layout the HTML structure of the email content leveraging the renderToString Solid API. This would add a single .tsx file in that layer. That'll convert things to the following:I put my component in a separate module within my Elysia BFF layer and imported the
getEmailTemplate in my module that sends the email. But when I run the code, I get the following error:This is my first time doing something like this and not sure what the proper way to do it is. A few thoughts:
- Why the heck is
React called out when I am using SolidJS? Feels like IDEs assume React too much - Is this the way I should be doing things? Am I allowed to have the convenience of using a component here?
- If it is possible, what do I need to be aware of when it comes to bundling the server now that I have a SolidJS component living there when I didn't have any before?
Appreciate any input and insights here.
