A developer converts a standard code component to a React-based virtual component that uses the platform's React library. Which change to the component class is required?
Select an answer to reveal the explanation.
Short Explanation
In a virtual component, you don't paint the canvas yourself; you hand the platform a picture and it hangs it. So updateView returns a React element, and there's no container to render into.
Full Explanation
A virtual code component implements ComponentFramework.ReactControl with its input and output types. In this model, init receives the context, the notifyOutputChanged callback and the state, but no container element, because the platform owns rendering. updateView is called with the current context and returns a React element, typically the component's root React component with props derived from the context, and the platform renders it within its own React tree using the shared React library declared in the manifest. Keeping StandardControl and calling ReactDOM.render into the container is the pattern for a standard component that bundles its own React; it is not virtual, does not use the platform library and loses the benefits of the conversion. Returning a React element from init does not match the interface, since init returns nothing and runs only once, so the view would never update. getOutputs returns values for bound and output properties to be written back to the host, not something to render, so returning a React element from it is meaningless to the framework. Exam caveat: the manifest must also set the control type to virtual and declare the platform libraries, otherwise the class change alone is not enough. Operational check: build the component, run it in the test harness, and confirm it renders and updates when the property value changes.