-
With the switch to the declarative style for sections, how does one add a new section to an existing Document |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Start to think of With A html page is static, just like a Word document So now, with a declarative style, you would take the data, then do a transform, then add it in So theres three steps:
Because these steps are now succinct with clear boundaries, there will be less bugs and will be easy to test Adding sections (aka mutating the |
Beta Was this translation helpful? Give feedback.
Start to think of
docx
likeHTML
then it starts making more senseWith
HTML
, you generally don't write html, then later, "add more<div>
s to the html"A html page is static, just like a Word document
So now, with a declarative style, you would take the data, then do a transform, then add it in
sections
all in one goSo theres three steps:
Document
Packer
to export the documentBecause these steps are now succinct with clear boundaries, there will be less bugs and will be easy to test
Adding sections (aka mutating the
Document
) blurs the lines between data and Word Document. It will be hard to unit test at the …