TypeScriptUI WidgetsWidget SDK

Legacy API

withToolData, and how to migrate to useWidgetSDK

Older widgets use the withToolData wrapper. It still works, but new widgets should use the hooks.

Legacy API

Kept for older widgets.

withToolData()

Higher-Order Component for automatic data fetching (legacy pattern).

Note

This is maintained for backward compatibility. New widgets should use useWidgetSDK() instead.

Example:

import { withToolData } from '@nitrostack/widgets';

function MyWidget({ data }) {
  return <div>{data.title}</div>;
}

export default withToolData(MyWidget);

Migration from withToolData

See Widget SDK Migration Guide for detailed migration instructions.

Next steps

On this page