Open rydash opened 2 years ago
Yup, I am experimenting the same trying to see the state of a Vue 3D lib I'm building. Would be nice actually to see the properties of the WebGLRenderer
There is a PR https://github.com/vuejs/devtools/pull/1159 with a potential fix but is looking for Reviewers, @Akryum do you think this could be somehow prioritized to get a review, it would be super helpful. Thanks
Version
6.2.1
Browser and OS info
Chrome 105.0.5195.127 / Windows 10 21H2
Steps to reproduce
create-vite
or another mechanism you prefer.render
and its value is aFunction
with any body. An example with the composition API:const renderObj = ref({ render: () => { } })
What is expected?
Vue DevTools accurately identifies when a Vue component has been passed as props or defined in a component's reactive state.
What is actually happening?
Vue DevTools assume that a
render: Function
value within an object in a component's props or reactive state means that entire object is an unknown or unregistered Vue component.This happens with both the Composition API and the Legacy API with Vue 3.
I understand how the current ducktyping attempts to identify Vue components, because all components would have that render function! But I wonder if there's a way to make the ducktyping more precise. I encountered this while adding a KontraJS Sprite as component data, which under the covers is an object containing a
render
function... so the Vue DevTools were unable to show me any other information about that Sprite unless I, like,console.log
'd it. Not great!