4 ms·
>ES6 has Map and Array, Bue ES6 is new, I never seen APIs that use Map , I often had to use an Object as dictionary and had to Google how to properly do it not
by simion314 8y ago
>ES6 has Map and Array,
Bue ES6 is new, I never seen APIs that use Map , I often had to use an Object as dictionary and had to Google how to properly do it not to get extra keys and values from the Object.prototype.
I am not trying to say that PHP is better then TS, but as far as type safety my PHP code with PHPDoc is better type checked then JS code with JSDoc (we are using ES5).
I don't have experience with PHP rendering, but I assume you only have to escape unsafe input, don't have to escape markuup, have you tried twig, is it not safe https://twig.symfony.com/doc/2.x/filters/escape.html https://twig.symfony.com/doc/2.x/filters/escape.html ?
I admit I like rendering with react, but I admit that reading a twig template is much simpler then reading JSX code (but I am condemned to use angular :-( ).