3 ms·
React can't execute arbitrary database queries.
by nprateem 8y ago
React can't execute arbitrary database queries.
- gdfasfklshg4 8y agoCan too! {e = () => ajaxCallToMutateDatabase()} Or something similar... It's just people don't do it because it is a bad idea!
- Aeolun 8y agoI’m sure you can use the all JS mysql client to connect directly from your client app to your database.
- nprateem 8y agoWell 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.
- mixedCase 8y agoReact can do SSR. You can use JSX on the backend for rendering pages just like on PHP.