meteorrn / meteor-react-native

Meteor client for React Native matching Meteor Spec
https://guide.meteor.com/react-native.html
Other
60 stars 33 forks source link

Docs: Added jsDoc #144

Closed jankapunkt closed 9 months ago

jankapunkt commented 10 months ago

Summary

Adds jsDoc to build and code

Linked issue(s)

partially #141 in order to improve documentation for better logging

Involved parts of the project

Added tests?

no extra tests

Targeted Meteor release version

-

Reproduction

clone repo, checkout docs/jsdoc and run npm run build:docs

jankapunkt commented 10 months ago

published a release 2.8.0-rc.1 for testing this PR

bratelefant commented 9 months ago

I do some testing with 2.8.0-rc.1.

bratelefant commented 9 months ago

Got a little trouble building with expo, because I also import @meteorrn/local and the depencency with 2.8.0-rc.1 is not accepted. Can I override (--force?) this in eas-cli?

jankapunkt commented 9 months ago

Is there a specific error?

bratelefant commented 9 months ago

If I do npm install @meteorrn/local@2.8.0-rc.1 I end up with No matching version found for @meteorrn/local@2.8.0-rc.1.

jankapunkt commented 9 months ago

You have to npm install @meteorrn/core@2.8.0-rc.1 , it's published to NPM so you don't need a local version.

Edit: since it's tagged as next on npm it's only installed if you explicitly set the version and the defualt on NPM still points to 2.7.1

bratelefant commented 9 months ago

I get @meteorrn/core@2.8.0-rc.1 installed, but while building with eas-cli I get

Could not resolve dependency:
[INSTALL_DEPENDENCIES] npm ERR! peer @meteorrn/core@">=2.0.7" from @meteorrn/local@1.0.3
[INSTALL_DEPENDENCIES] npm ERR! node_modules/@meteorrn/local
[INSTALL_DEPENDENCIES] npm ERR!   @meteorrn/local@"^1.0.3" from the root project

because I also have @meteorrn/local@1.0.3 in my package.json. Is @meteorrn/core@">=2.0.7 not fulfilled?

jankapunkt commented 9 months ago

ah I see, this is a peer dependency conflict, let me check, if I can resolve this quickly

bratelefant commented 9 months ago

Can we simply add a >= 2.0.7 || 2.8.0-rc.1 or something as a peer dep for meteorrn/local?

bratelefant commented 9 months ago

Could build it with the added peerDep

bratelefant commented 9 months ago

I'd like to report that removing NetInfo in my staging environment seems to solve a problem that occurred randomly and is still hard to reproduce.

Namely, on iOS, when bringing the app back up from (suspended) background, the user did not log back in, although the socket was connected.

Now I manage connection / disconnecting via rn AppState, look good so far.

jankapunkt commented 9 months ago

Great! We should add that to the docs, like a troubleshooting section. Something like "if you have trouble with reconnecting,.try Appstate instead of NetInfo. Here is a minimal example:...". Do you have the time and will to add this section to this PR?

jankapunkt commented 9 months ago

@bratelefant we will add Troubleshooting / FAQ in another PR, would you mind adding a review in the meantime?

bratelefant commented 9 months ago

We can merge this, will add my AppState example in another PR

jankapunkt commented 9 months ago

Thanks :+1: