• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spautz / react-hibernate / 10893842371

16 Sep 2024 11:48PM UTC coverage: 90.476% (-0.7%) from 91.176%
10893842371

push

github

web-flow
build(deps): bump express from 4.19.2 to 4.21.0 (#65)

Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Steven Pautz <spautz@gmail.com>

21 of 23 branches covered (91.3%)

Branch coverage included in aggregate %.

74 of 82 relevant lines covered (90.24%)

14.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/packages/react-pauseable-containers/src/PauseableReduxContainer.tsx
1
import PropTypes from 'prop-types';
1✔
2
import React from 'react';
1✔
3
import { Provider, useStore } from 'react-redux';
1✔
4

5
import { createPauseableStore, PauseableStoreInstance } from 'redux-pauseable-store';
1✔
6

7
import { PauseableContainerProps } from './types';
8

9
export interface PauseableReduxContainerProps extends PauseableContainerProps {
10
  dispatchWhenPaused?: boolean | null;
11
}
12

13
const PauseableReduxContainer: React.FC<PauseableReduxContainerProps> = (props) => {
1✔
14
  const { dispatchWhenPaused, shouldUpdate, children } = props;
2✔
15

16
  const parentStore = useStore();
2✔
17
  const pauseableStore = React.useMemo<PauseableStoreInstance>(
2✔
18
    () =>
19
      createPauseableStore(parentStore, {
2✔
20
        // A change to the `shouldUpdate` prop will already cause a rerender, so we don't need an extra notification
21
        notifyListersOnUnpause: false,
22
      }),
23
    [parentStore],
24
  );
25

26
  pauseableStore.setPaused(!shouldUpdate);
2✔
27
  pauseableStore.setDispatch(dispatchWhenPaused);
2✔
28

29
  return <Provider store={pauseableStore}>{children}</Provider>;
2✔
30
};
31

32
PauseableReduxContainer.defaultProps = {
1✔
33
  dispatchWhenPaused: null,
34
};
35

36
PauseableReduxContainer.propTypes = {
1✔
37
  children: PropTypes.node.isRequired,
38
  dispatchWhenPaused: PropTypes.bool,
39
  shouldUpdate: PropTypes.bool.isRequired,
40
};
41

42
export { PauseableReduxContainer };
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc