Re:Moving from Go to PHP Again
by nprateem on Friday February 08, 2019 @03:19AM
(#19112390)
React can't execute arbitrary database queries.
[ Parent
| on HN ]
I’m sure you can use the all JS mysql client to connect directly from your client app to your database.
Well yes if you're stupid enough to directly expose your DB to the world then it's technically possible, but barring such idiocy there's arguably more risk of a DB hack through PHP than client side JS in most architectures.
React can do SSR. You can use JSX on the backend for rendering pages just like on PHP.
Re:Moving from Go to PHP Again
by gdfasfklshg4 on Friday February 08, 2019 @06:17AM
(#19113198)
Can too!
{e = () => ajaxCallToMutateDatabase()}
Or something similar...
It's just people don't do it because it is a bad idea!