Simplified interface for models that need basic Future awareness.
Provides essential Future status information without full container complexity. Ideal for models that typically handle single operations or need simple Future integration.
function OperationStatus({ model }: { model: FutureAware }) { return ( <div> <p>Status: {model.status}</p> <progress value={model.progress} max={100} /> <p>Time remaining: {model.timeRemaining}</p> {model.status === 'IN_PROGRESS' && ( <button onClick={() => model.cancel()}>Cancel</button> )} </div> );} Copy
function OperationStatus({ model }: { model: FutureAware }) { return ( <div> <p>Status: {model.status}</p> <progress value={model.progress} max={100} /> <p>Time remaining: {model.timeRemaining}</p> {model.status === 'IN_PROGRESS' && ( <button onClick={() => model.cancel()}>Cancel</button> )} </div> );}
Simplified interface for models that need basic Future awareness.
Provides essential Future status information without full container complexity. Ideal for models that typically handle single operations or need simple Future integration.
Example: Basic Future Awareness