ImGUIs you do whatever you want with your state. You read your state and call UI functions.
React requires knowing about your state because it wants to monitor all of it for changes to try to optimize not doing things if nothing changed. This ends up infecting every part of your code to do so. It's the number 1 frustration I have using React. I haven't used Flutter or SwiftUI so I don't know if they are analogus
It seems like those libraries do what IMGUI do, but more structured.