question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`useSelector` comparator swallows errors

See original GitHub issue

Do you want to request a feature or report a bug? Reporting a bug.

What is the current behavior? Errors thrown in useSelector comparator are swallowed.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn’t have dependencies other than React. Paste the link to a CodeSandbox (https://codesandbox.io/s/new) or RN Snack (https://snack.expo.io/) example below: https://codesandbox.io/s/redux-useselector-comparator-bug-ho0e4

What is the expected behavior? Error should not be swallowed.

Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux? react@16.8.6, react-dom@16.8.6, redux@7.1.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
markeriksoncommented, Jun 12, 2019

I’d be okay with logging caught errors in the subscription handler in dev.

1reaction
timdorrcommented, Jun 12, 2019

Sure, we’re always open to doc improvements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hooks Considered Harmful - Hacker News
For the cases where you actually want to just swallow errors, you can just add a `.catch(noop)`. This makes such situations explicit.
Read more >
UseSelector with React.memo vs connect – iTecNote
It will also “swallow” such actions so don't worry about your reducers receiving weird function arguments. Your reducers will only receive plain object...
Read more >
@mui/system | Yarn - Package Manager
CSS utilities for rapidly laying out custom designs. Installation. Install the package in your project directory with: // with npm npm install @mui/system...
Read more >
React Basics - GitHub Pages
React Props; React State; React Events; React Lists; React RESTful API; React Forms; React Hooks; React Context; React Router; React Error Boundaries ...
Read more >
how to make a button change to state redux - You.com | The AI ...
When this middleware is enabled, if you dispatch a function, Redux Thunk middleware will give it dispatch as an argument. It will also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found