Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve census fetching integration with actions that require it #167

Open
elboletaire opened this issue May 21, 2024 · 0 comments
Open
Labels
enhancement New feature or request react-providers

Comments

@elboletaire
Copy link
Member

Right now, most census calls are fetched only if fetchCensus is set into the ElectionProvider. Not defining this to true and trying to use features like voting (in most cases) will make the components to behave weird, or simply not work as expected.

This is an error from the developer from not setting it, but we should either warn in these situations where it's needed and it's not set, or maybe even set it ourselves when a feature requiring it is rendered.

Personally I've lost around 2h debugging this until I find out I simply forgot setting fetchCensus to the ElectionProvider component 🤦🏼. Something so simple as a warning in the console saying "fetch census not executed because fetchCensus is falsy" would have been more than enough to avoid losing 2h (it's on me since I personally did all this... but more reason to add it).

@elboletaire elboletaire added enhancement New feature or request react-providers labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request react-providers
Projects
None yet
Development

No branches or pull requests

1 participant