The core idea isn't strictly to generate CSS from JavaScript per se, but to generate CSS in whatever code is generating your HTML. In React, that's JS, but if you're generating HTML server-side in PHP or Ruby, the argument calls for generating CSS in PHP or Ruby.
vjeux's talk identifies seven problems:
1) global namespace: CSS has a page-global namespace for classes
2) dependency management: if you forget to include CSS, but another module/component on the page includes the CSS you need, your code will seem to work, until they remove their dependency and your code will magically break
3) dead code elimination: you can't know whether a CSS rule can be removed unless/until you can prove that the HTML generator won't generate any HTML that matches its selector, which can be impossible in the general case
4) minification: you can't minify class names without coordinating with the HTML generator
5) sharing constants: "padding: 5px" has to be kept in sync with the HTML generator "buttonPadding = 5"
6) non-deterministic resolution: loading CSS files in a different order results in different rules with the same specificity winning ties
7) isolation: component clients can use CSS to style the internals of an element, making the HTML structure implicitly part of a component's API
vjeux calls for applying generated styles as inline styles with the "style" attribute, primarily because it's straightforward to implement. You may be able to get better performance by generating a <style> tag on the server side, or extracting a CSS file from the HTML generator instead.
Beware that if you're generating your HTML only in client-side JS, that can be bad for performance, and CSS-in-JS is likely to make that worse. At least run your JS on the server side, so you can send HTML + CSS to the client on first load.