Skip to content

Consider exporting useProgressBarContext() as opposed to useProgressInternal()? #15

Description

@58bits

Consider exporting useProgressBarContext() as opposed to useProgressInternal()?

We have another React component on page that navigates based on filters the user applies, and in addition to the progress bar provided here, we also place a spinner next to the filter panel.

We'd like full access to the { loading, spring, start } ProgressBarContext type, so that we can monitor loading

I believe (although correct me if I'm wrong) - that if we try to use

import { useProgressInternal } from 'react-transition-progress...
...
const progress = useProgressInternal()

...we'll end up with a new instance of loading state?

Why not export useProgressBarContext instead or as well as useProgressInternal? Or update useProgress to export the full ProgressBarContext (although this would be a breaking change)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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