How to listen to theme changes on jlab?

I want to be able to listen to theme changes and update my React widget colors according to that. How can I achieve that? thanks

how to get which theme is currently active?