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

Compatibility with react-boilerplate #23

Closed
wants to merge 5 commits into from

Conversation

michelalbers
Copy link

This pull request achieves two things:

  1. This ensures compatibility with some boilerplates (e.g. https://github.com/mxstbr/react-boilerplate) by using require('firebase/app'); instead of import firebase from 'firebase';.
  2. Lists in Firebase are build as objects with uids as keys likes this:

    Firebase response

     {
         'absdfTGTdd-kV': true,
         'absdfTGTdd-kX': true
     }
    With this PR the lib checks for value true and takes the key as id value. Now populate works with the above scheme, too.

@prescottprue
Copy link
Owner

Thanks for the PR!

I would like to get tests passing, and have a little while to test.

Looking into why the tests didn't pass now.

@prescottprue
Copy link
Owner

It looks like the error in the build might be caused by the new pattern of requiring you used.

We might have to include the whole Firebase library in a top level require first.

I am going to look into other ways of making things compatible with the mentioned boilerplate. Might also look into adding an example that uses mentioned boilerplate.

@prescottprue prescottprue self-assigned this Jan 7, 2017
@prescottprue prescottprue mentioned this pull request Jan 7, 2017
prescottprue added a commit that referenced this pull request Jan 7, 2017
* UID Lists with value `true` now supported (from #23):
  ```js
  {
    'absdfTGTdd-kV': true,
    'absdfTGTdd-kX': true
  }
  ```
* Handle `equalTo` query with `true` and `false` (fixes #25)
* Roadmap updated
@prescottprue
Copy link
Owner

v1.1.4 handles populating lists by $uid: true. Will continue to look into addressing boilerplate integration.

@prescottprue prescottprue changed the title Ensure compatibility with some boilerplates, make populate compatible with standard firebase lists. Ensure compatibility with some boilerplates Jan 8, 2017
@prescottprue prescottprue changed the title Ensure compatibility with some boilerplates Compatibility with react-boilerplate Jan 8, 2017
@michelalbers
Copy link
Author

Thank you so much for your work - If I can be of any help please let me know!

@prescottprue
Copy link
Owner

@michelalbers Wanted to ask, are you using yarn or are you disabling it with USE_YARN=false npm run setup as listed in the boilerplate quickstart?

@prescottprue
Copy link
Owner

prescottprue commented Feb 8, 2017

Functionality planning and updates moved to #53

@projoneftw
Copy link

Hi, I'm trying to integrate this library with my existing project, based on react-boilerplate.
I added the following to my enhancers

reactReduxFirebase(config, {
      userProfile: 'users',
}

The auth and signup is working well, it's saving user profile to Firebase, but it won't load it back.

@prescottprue
Copy link
Owner

@projoneftw Not sure what you mean by "didn't load it back". Are you using pathToJS(state.firebase, 'profile') within the connect function of the component in which you would like to load the profile?

I think this is more an issue with app code then compatibility with react-boilerplate since errors were being thrown before this fix (not just data not loading). Feel free to reach out over gitter for help confirming.

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

Successfully merging this pull request may close these issues.

None yet

3 participants