As already noted, you can use React with uncss by sending URLs to pages. However, there is an alternative way. React has a function renderToStringthat will return the HTML output as a string. you can write this to a file and transfer the file uncssto find all css selectors. Keep in mind that it will not detect dynamically added classes, so they must be added manually to ignore the property of the options object passed to uncss. You can learn more about this at uncss docs.
source
share