mironov / react-redux-loading-bar

Loading Bar (aka Progress Bar) for Redux and React
https://mironov.github.io/react-redux-loading-bar/
MIT License
936 stars 93 forks source link

It does not render any classname nor interact with the store #85

Closed kopax closed 5 years ago

kopax commented 5 years ago

I've just tried to add <LoadingBar /> in my app, it render a <div></div> with no class.

I have wrapped the div because it was completely impossible to use style className or css to customize the props.

    <div css={`
      & > div {
        height: 3px;
        background-color: red;
        position: absolute;
      }
    `}>
      <LoadingBar />
    </div>

Looking at redux store, it get populated on first dispatch but stays at 0.

mironov commented 5 years ago

@kopax How do you import LoadingBar? It should be imported from the default export in order to be connected to the store.

import LoadingBar from 'react-redux-loading-bar'

You should be able to configure style by passing the style prop:

<LoadingBar style={{ backgroundColor: 'red', height: '3px', position: 'absolute' }} />
kopax commented 5 years ago

Yes, we did like this. We also tried the immutable version. Both failed so we switch to another lib. Maybe it's our fault. Thanks for replying though.