Hook to access the current view identifier (ChatGPT only)
Useful for multi-view widgets that need to know which view is active.
Current view identifier or undefined
function MultiViewWidget() { const view = useView(); switch (view) { case "settings": return <SettingsView />; case "details": return <DetailsView />; default: return <MainView />; }} Copy
function MultiViewWidget() { const view = useView(); switch (view) { case "settings": return <SettingsView />; case "details": return <DetailsView />; default: return <MainView />; }}
Hook to access the current view identifier (ChatGPT only)
Useful for multi-view widgets that need to know which view is active.