I think dynamic scope can work with setState by allocating a new closure that closes over the dynamic vars, aliasing them into lexical scope of the render function.
The problem with React Context is that it bypasses the general solution offered at language layer for a react-specific solution, essentially breaking any code written without prior knowledge of React.
Can you say what changes would be required in React for this to work? I assume that you are asking for parent components to be on the stack when child components render, but that is simply not how React works – you return a description of what you want to render then React calls into the children. How could the parent be on the stack?
If you have a concrete suggestion for something we could change in React I'd be happy to chat about it. I'd love to support CLJS better.
The problem with React Context is that it bypasses the general solution offered at language layer for a react-specific solution, essentially breaking any code written without prior knowledge of React.