I get that there are macros, but how are html tags valid syntax? Is rust just interpreting the html content as strings?
I've only ever seen C macros, and I don't remember seeing this kind of wizardry happening there.
I get that there are macros, but how are html tags valid syntax? Is rust just interpreting the html content as strings?
I've only ever seen C macros, and I don't remember seeing this kind of wizardry happening there.
One great thing about JSX (and Yew) is that it's way more secure way to build an HTML, because you don't need to worry about escaping behaviors as much. (Sometimes you still need, like injecting inline CSS etc. but not that often)
As you would expect, you will find macros for HTML, JSON etc. in libraries, but there are also quite a bunch of smaller, frequent macros that simply reduce common boilerplate.
https://doc.rust-lang.org/1.7.0/book/macros.html#syntactic-r...