Coder Social home page Coder Social logo

Comments (4)

tripstar22 avatar tripstar22 commented on May 28, 2024 1

@mironov thanks for the response. Yup you're correct about using the fetching prop.

Seems to be working now so I will close this issue. Thanks again!

from react-redux-loading-bar.

mironov avatar mironov commented on May 28, 2024

@tripstar22 Hi there. Am I right that you don't use any promise middleware and you will control the visibility of your ProgressBar by yourself using the fetching prop?

If that is true, I think you can import not connected LoadingBar component and mount it directly.
Something like this should work for you:

import { LoadingBar } from 'react-redux-loading-bar';

# <...> removed styles for the purpose of brevity

const ProgressBar = ({ fetching }) => (
  <WrapProgressBar fetching={fetching}>
    <header>
      <LoadingBar loading={1} style={{ backgroundColor: InfoColor, height: '10px', opacity: '1', zIndex: '100000' }} />
    </header>
    <GradientOverlay />
  </WrapProgressBar>
);

You can also skip the middleware and reducer steps because they are needed to show/hide the loading bar automatically during long-running actions.

Please let me know if that helps.

from react-redux-loading-bar.

hamza-jutt avatar hamza-jutt commented on May 28, 2024

Hello! @mironov
I've a similar issue. Loading bar is not being displayed.

Here is the store config. I'm using axios.

import promise from 'redux-promise';
import thunk from 'redux-thunk';
import {applyMiddleware, createStore, compose} from 'redux';
import { loadingBarMiddleware } from 'react-redux-loading-bar'


const store = createStore(
    reducers,
    compose(
        applyMiddleware(promise, thunk, loadingBarMiddleware()),
        window.devToolsExtension ? window.devToolsExtension() : f => f
   )
);

from react-redux-loading-bar.

mironov avatar mironov commented on May 28, 2024

@hamza-jutt Please open a new issue and show how you mount Loading Bar.

from react-redux-loading-bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.