Hmm, interesting. What advantages do you see of using JSX for querying over the old jQuery-style $("#id").append(...)? Did you consider doing something more like that, but allowing JSX instead of HTML strings like it was done in jQuery?
function onUserLogin(user) {
matry.replace(
<main id="root">
<img key="user-profile" src={user.profileImage} />
<aside>
Welcome, {user.name}
</aside>
</main>
)
}
In this example, the img and aside elements could be anywhere in the tree.