// @flow export type Return = [S, (S) => void]; declare export default function useStateWithCallback( defaultValue: S, callback?: (S) => void | Promise, ): Return;