Function useInstance

Enables full separation of concerns between a React components template and all of the logic that drives it.

Returns an instance that fully represents a logical instance of a rendered React component, with the exception of the JSX template itself.

This means the all of your components logic and lifecycle handlers can be externalized from the function component itself, and defined in a separate class.

The provided class should be a subclass of ComponentInstance.