roact icon indicating copy to clipboard operation
roact copied to clipboard

"host object" error is confusing

Open Kampfkarren opened this issue 5 years ago • 2 comments

I received an error when using a portal: "Expected target to be host object". I had to look through the source code to figure out host object just means instance (in the Roblox renderer, anyway). The error should probably be changed, as I do not believe this term is used anywhere except internally.

Kampfkarren avatar Apr 04 '20 02:04 Kampfkarren

We've tried to expand usage of this term in the Roact documentation:

  • https://roblox.github.io/roact/guide/components/#host-components
  • https://roblox.github.io/roact/advanced/bindings-and-refs/#refs-as-host-properties

I don't think we communicate the meaning of this term particularly well. Though "instances" is the term that Roblox generally uses, it's very vague and collides with many other terms. We also chose 'host object' to match React, which has the additional constraint of running on multiple DOMs.

I'm not sure what the best path forward is.

LPGhatguy avatar Apr 08 '20 20:04 LPGhatguy

Instance would the correct term I feel, but it does collide with other terms. Perhaps it can say something like "Expected target to be an instance, such as a Frame"?

Kampfkarren avatar Apr 09 '20 01:04 Kampfkarren