Open chungchi300 opened 4 years ago
i dont think there is a solution, for us we store both html and json design into the database
Agree, I also store both html and json as a workaround. And I think it increases the maintainability when we follow Single source of truth if we can store the JSON only and use the render function
even an async render function is cool too.
@chungchi300 we do have a REST API that you can use to convert JSON to HTML. Check: https://docs.unlayer.com/reference#render
We store the design into the database in JSON with the Admin portal. How to use a pure function to render related html when I use it in the front end?