Open Mokto opened 8 years ago
Meteor.ddp.on("change") etc still not working on mine. Can you give some example about implementing that?
Hello, for Meteor.loginWith[Provider], maybe with a Oauth authentication like https://github.com/FranciscoVictor/accounts-facebook-ddp ?
@Mokto @spencercarli
I personally like the way that meteor does Oauth - more of an opt-in than baked in out of the box.
What I found when writing this Google Oauth tutorial is that there are a lot of moving parts on both the meteor side and RN side (especially configuration on the RN side).
Maybe it would be better to write docs/guides/tutorials for this and link to them in the README? Can we build extensions off of this npm package to enable oauth? i.e. react-native-meteor-oauth-google
@radiegtya can you please create an issue regarding this ? It is not appropriate here.
@balibou The problem is that we have to add native code to this plugin event for users who don't use oauth signin.
@spencercarli I do not know yet what to do. There are 2 possibilities in my opinion :
1) Do what you say, it could be really nice to add plugins to extend features. In this case maybe we should move FSCollection to another plugin called react-native-meteor-collectionfs. Or just in case native code is needed. What do you think ?
2) Or maybe we should just call login method with credential token and credential secret and let each user do the work to get these credentials.
I do not know yet ^^
@Mokto : ok I'll :+1:
@Mokto I would rather go the first route - put as much work as possible on the extension packages rather than in application code. I've found with OAuth there are a ton of ways to mess it up and I would love to have one "right" way to do it.
Ok, I'll go for first solution then. What do you think about plugins that don't need native code ? Shall I include them in this plugin ?
That's an interesting one - if it's in a different package then it can be released independently of the entire react-native-meteor
package but then it's an additional repo to manage...
I guess it goes to the whole debate we often see in the Meteor community. Is it worth it to be a "core" package or should we split it out to more of a community type package?
I've offered no solutions, simply more questions haha
Ok,
CollectionFS seems to be pretty important to me so I'll let it in this package. I'll think about it for other packages.
What will you do with collectionFS @mokto? You want a complete one (saving data to gridfs/filesystem/s3, fetch the data, and modify the data) or you just want a part of it? This is interesting, ofc if you can implement it with combination of the popular react-native-image-picker
No I want the full CollectionFS !
I have done what is needed to read data (this is more important to me) but eventually I'll add something to upload photo (by the way, I think it is already working, I just did not try yet).
React-native-image-picker sends base64 back, so the only thing that matters is to do Meteor.collection('images').insert(base64ImageData)
yeah it's working. I have tried 3 days a go lol. But video cannot be saved because it doesn't return base64Data on react-native-image-picker. I can't successfully convert the response.uri callback to base64 manually for video. Plus taken picture (not from camera roll) but directly using camera, the base64 file able to be saved to collectionFS, but it cannot be shown (on react native only) but the link able to be opened (very strange behaviour).
Dunno if it's appropriate to talk here. But if you can help me, it will be cool and ofc can be used to be added to Readme working example
https://github.com/facebook/react-native-fbsdk/tree/release-0.1.0-alpha just released, looking into it when I get time available.
Just wanted to say many thanks for the great project. I hope Ill be able to help as soon as I get better at all this.
Thank you !
Another thing for 1.0.0 : what do you think about documentation ?
Does anyone want to do it ? 👍
@Mokto what do you think about using container components, the new react-meteor api as of 1.3
Thank you for pointing this out !
Yes I think I have to fit new meteor specs... Looking into this soon.
Might be useful for loginWithOauth:
https://github.com/eddflrs/meteor-ddp/blob/master/meteor-ddp-oauth.js
Thanks. I did know how to login with oauth. What takes time to do is implementing a native Facebook, Google, Twitter...etc login.
In fact I really like the way you did it. What would be the gain with containers ?
It's just a matter of preferences. getMeteorData would stay as it is now.
The pro of createContainer is to separate view and data, I think. I have not tried it yet ;)
Use of Promises would be nice to have. For example for subscriptionIsReady something like:
Meteor.subscribe("products").then(() => { // do stuff }).catch((err) => { console.log(err) });
Currently the MeteorListView does not trigger a renderRow if e.g. something in the state changed. So the only way right now to force an update of a row is to update the dataSource, which is quiet complicated in some cases.
I try to fit the most to meteor client.
Subscribe already returns an reactive handle which returns ready when it is.
It is awesome that the usage is similar to Meteor (and so far the only library that I found which is using this way), but for me it causes problems in Meteor 1.3 as the handle.ready() always returns false, or at least is not causing a re-render. I have also created a question on stackoverflow.
Do I see that correctly, that the library is not compatible with Meteor 1.3 yet? For some reason the handle is not reactive for me... :(
Beside that: Great package that saves a lot of time!
I just answered your stackoverflow asking.
;)
Wow, so fast! Thank you so much! :) Really appreciate!
I just got done getting React Native up and running with @spencercarli 's boilerplate repo. I'm looking to spin this up next. A useful thing to have might be a limitations section in the README... what can't you do with this package that you would normally be able to do with Meteor because:
This limitation section could also help provide perspective on what else might be important to have.
Absolutely right !
Will be adding this soon ! ;)
By the way, I'm not sure if this helps address limitations suggestion by @funkyeah but it seems like most of the meteor context is in order.
https://github.com/smartdemocracy/react-native-local-mongodb
I like the idea of showcasing limitations, I was wondering if minimogo-cache and the trackr dependencies represent drop-In substitutes for minimogo and Tracker.
@smooJitter
Yes minimongo-cache and trackr are react-native compatible substitutes for minimongo and Tracker.
Your library is very interesting btw. I am now considering replacing minimongo-cache by https://github.com/smartdemocracy/react-native-local-mongodb. What do you think ?
Thanks for the link !
I recently wrote a tutorial about oauth with facebook and used react-native-meteor
and the new react-native-fbsdk
. The way I'm doing things is pretty hacky but it may serve as a good example on how we could start creating packages for oauth.
https://medium.com/@spencer_carli/react-native-meteor-oauth-with-facebook-3d1346d7cdb7#.yaj5n8uqm
The biggest challenge is going to be configuring the native packages for android and ios.
Your article looks great !
Yes, it is a shame that there is no rnpm install yet.
I haven't got time available for this, but I had seen react-native-fbsdk too, and want to create a react-native-meteor-fblogin for this plugin, as we discuss earlier.
Hi, I am trying to do some research before starting a project,
I have coded with meteor working through tutorials etc and am really pleased to see that it has been integrated with react-native so I don't have to use cordova,
May I ask if it is possible to use your react-native-meteor to sync/link data from the meteor mongodb backend to an offline Realm db for full functionality in apps when in offline mode,
If so do you have any suggestions how this may be accomplished either now or in future features of your plugin?
Looking at https://realm.io/docs/react-native/latest/ this seems to be way things are going to go with react-native and also from what meteor team are saying that they will be integrating further with react on-going it would be a useful step to add the realm 'connection' into your plugin rather than a completely new solution, would appreciate any advice or feedback you may give,
Thanks very much,
Hi,
Yes, offline subscriptions is one of most needed feature with this plugin. But unfortunately I have no time to deal with this feature right now.
I do not know Realm db to be honest, but I cannot see how this would help this plugin. I was more thinking about using https://github.com/smartdemocracy/react-native-local-mongodb to save data into cache.
Thanks for your feedback ;)
Hi, first, thanks for your awesome work.
I'm starting with Meteor, React, React Native and would love to see examples of apps built using react-native-meteor that use social login. Are there such on github or tutorials?
Thanks for your answer :-)
I hope can have promise for Meteor.call and some other methods, like Meteor.Accounts.createUser, Meteor.loginWithPassword etc.
Hi guys, first of all thanks for putting al this together. I've been using Meteor for a while and now I'm trying to deep into react native and looking at what you did looks is very exiting. I was bale to put project together using user/password and facebook auth with this package and reading a few of @spencercarli articles, that btw are so helpful. I used the react-native-fsdk too. Tying everything together was challenging since it's not as straightforward as it is nowadays with meteor, where you pretty much have a package to do anything. It would be great to be able to do the same using react-native. It's being a while since you last updated this, so I was wondering what was your progress putting the fb-accounts package or any other accounts package, if you are still working on it.
Thank you
Hi everyone,
With the work I've done/accomplished this week-end, I think we are close to a major 1.0.0 release. I would like to make a Todo List of what is needed for this final release.
Please feel free to contribute and tell me what's wrong/missing in this plugin.
I'll update this post according to your advice. Thanks !!
TODO in 1.0.0
TODO next