Skip to content

Hooks to include error in return instead of throw errors #152

@Develliot

Description

@Develliot

Currently if client isn't ready hooks will throw an error.

I think it would be much nicer if it simply returned an error like useSWR does.

return

const value: {
  decision: OptimizelyDecision | null,
  clientReady: boolean,
  didTimeout: boolean,
  isLoading: boolean,
  error: Error | null
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions