3 ms·
Sure, that’s reasonable if your only concern is echoing strings. Part of what’s appealing to me about JSX is that it’s capable of far more than string output (e
by eyelidlessness 3y ago
Sure, that’s reasonable if your only concern is echoing strings. Part of what’s appealing to me about JSX is that it’s capable of far more than string output (even in that’s ultimately all you’re producing from it). The thing (usually) produced in a JSX expression is a value, which can be any arbitrary data structure, and can be composed in any arbitrary way you like. Echoing strings—which is to say producing output as a side effect, out of band of a component’s return value—undermines that. It’s totally a valid approach (and makes perfect sense in the context of PHP’s rendering model), it just has a different set of capabilities.