Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created May 23, 2018 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/88fe491821d273593e9fbf1356686585 to your computer and use it in GitHub Desktop.
Save uno-de-piera/88fe491821d273593e9fbf1356686585 to your computer and use it in GitHub Desktop.
//populamos los registros con el usuario que ha creado el registro
const populates = [
{child: 'createdBy', root: 'users'}
];
@firebaseConnect(() => ([
{
path: 'projects', //path de firebase
populates //info a rellenar
}
]))
@connect(({ firebase}) => ({
projects: populatedDataToJS(firebase, 'projects', populates), //mapStateToProps
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment