Did you ever need to generate PDFs or e-mails? Was it fun? I guess not. Maybe the solution is in the tools you are already using. Taking advantage of React server-side rendering you can make the process less painful and the code easier to maintain.
We will be discussing the complexities of building emails and PDFs as well as going through two real case studies to explain how we managed to ship these functionalities.
TLDR; React components benefits can be used outside a typical web application. "Good enough" is fine. Ship it!
OUTLINE:
Emails:
- Problems: text-only emails, consistency, tables.
- Idea: SSR with the benefits of components
- Case study: Séntisis emails
- Using components to remove complexities
- Demo repo and how to use it
- Behind the scenes
PDFs:
- Problems: complexity, styling
- Initial idea: SSR using components + wkhtmltopdf
- Case study: Séntisis reports
- Demo repo and how to use it
- Doing it better: using a headless browser
- Conclusion and with an ending "Dancing Hopper" GIF