It's not quite the same as screenshot testing, but I've had success using snapshot testing in React. The idea is outlined here:
https://jestjs.io/docs/en/snapshot-testing
Snapshots of the intermediate representation (e.g. JSX in React) will be less brittle than e.g. a screenshot of pixels. It also works best when your UI is a function of some easily-constructed state. Other frameworks sharing these features would also work well with snapshot testing.