You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing that bothered me is that Arrow's HTML templates preserve all whitespace, which made it difficult to write HTML in a readable way and avoid unwanted spaces and newlines ending up in the DOM. For instance, my interpreter is supposed to have these four buttons flush:
But in the first version using Arrow, they looked like this:
To avoid this, I had to change the template from
<button>
Run
</button>
<button>
Pause
</button>
to
<button>
Run
</button><button>
Pause
</button>
which I find to be pretty ugly. Actually, since this interpreter uses white-space: pre in the code window, it was even worse --- I had to cram things into really long lines to avoid this (this is the result of the program, and none of that whitespace is supposed to be there):
Could Arrow trim this extra whitespace? Or is there already a better way to cope with this that I'm missing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Arrow seems cool! I tried converting a small project, an esoteric programming language interpreter, from React to Arrow, and it was refreshingly easier to switch than I expected, and nice to get rid of the whole complex build system.
One thing that bothered me is that Arrow's HTML templates preserve all whitespace, which made it difficult to write HTML in a readable way and avoid unwanted spaces and newlines ending up in the DOM. For instance, my interpreter is supposed to have these four buttons flush:
But in the first version using Arrow, they looked like this:
To avoid this, I had to change the template from
to
which I find to be pretty ugly. Actually, since this interpreter uses
white-space: pre
in the code window, it was even worse --- I had to cram things into really long lines to avoid this (this is the result of the program, and none of that whitespace is supposed to be there):Could Arrow trim this extra whitespace? Or is there already a better way to cope with this that I'm missing?
Beta Was this translation helpful? Give feedback.
All reactions