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

Adding firebase parameter to profileFactory in createUserProfile #772

Closed
dannyvaughton opened this issue Oct 10, 2019 · 3 comments
Closed

Comments

@dannyvaughton
Copy link
Contributor

I would like to discuss/request a small addition to the profileFactory callback in the createUserProfile user function.

Currently createUserProfile calls config.profileFactory with two parameters: userData & profile. I would like to discuss adding third: firebase.

The reason is because in profileFactory, I would like to run a few database checks before writing data to the user's profile. I am struggling with using firebase within this function because firebase & firestore have not yet been instantiated.

Currently, I am placing this logic within my Login & Sign Up components, but I feel it would be better placed in profileFactory.

What are your thoughts & would you like me to submit a PR?

@prescottprue
Copy link
Owner

Interesting idea! Feel free to submit a PR.

Have you been using the next version (v3 series in pre-release)? I ask because that is about to be released to latest, and since this is a change in the API, maybe it would be good to add it to a pre-release version before it goes to latest?

If not, making it the third argument should prevent breaking changes for most, so we could add it to a new minor version of the 2.*.* versions (maybe 2.5.0).

Thanks for reaching out!

@dannyvaughton
Copy link
Contributor Author

Yes, I am using v3. Ok great thanks, will submit a PR 👍

@prescottprue prescottprue mentioned this issue Oct 11, 2019
3 tasks
prescottprue added a commit that referenced this issue Oct 12, 2019
* feat(profileFactory): adding `firebase` parameter to `profileFactory` callback - #772 - @dannyvaughton
* feat(core): add `eslint-plugin-json` and update jsdoc comments
* fix(core): use `import *` in place of index file for actions
* fix(core): use `@see` in jsdoc to provide docs links
* feat(ci): add node 12 to travis build versions
* feat(core): remove consumer exports from top level API (available from `Context.Consumer`)
* feat(docs): more v3 API change updates to docs
* fix(examples): update firestore example with v3 api
* chore(deps): update [documentationjs](https://documentation.js.org/) version to 12.1.2
* chore(deps): update webpack to 4.41.0
@prescottprue
Copy link
Owner

Released in v3.0.0-beta is is now part of latest since v3.0.0 went out. Thanks for reporting and making a PR so quickly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants