#648·ripple

[Feature]: Add hydration support for {ref exp} tags

Author: trueadmCreated Feb 14, 2026Updated Apr 29, 2026
Labelsenhancement

We should add hydration support for <div {ref some_Ref} />, including updating how refs work so that we can somehow make SSR work with them, and thus hydration work too?

javascript
const ref = (node) => {
  // do stuff
}

ref.ssr = (props) => {
  return {
    'data-foo': true
  }
}

Maybe it's the case that we don't do anything for them and treat them as purely client-side things only. However, I can see benefits of maybe providing some metadata on elements or just good fallbacks, especially in the case of handling bindValue etc.

javascript
const bindValue = (thing) => {
  const ref = (dom) => {
    // handle bindValue
  };

  ref.ssr = (props) => {
    if (props.value === undefined) {
      return { value: @value + "" }
    }
  }

  return ref;
}