I've used it in static site generation (injecting HTML generated by a Markdown parser). As there are better solutions now it would be possible to avoid that. But since it's totally under my control the security issue doesn't matter (no way for someone to inject code without going through me first).
It's particularly dangerous if your users can inject the data as then you literally have XSS vulnerability in your application. Instead of injecting pure HTML you probably want to have some intermediate format you control in between (say JSON that's mapped to React components). There's a good reason why it has been named the way it has been.