Comments (4)
I completely hear you on the "future proof" title 😉 I originally had it as "update" but changed it at the last minute.
It sounds like there's a desire to go ahead with something like this. I think the steps for this are:
- Start a
next
branch which will include the next version of the API. - Add the new API structure but keep the feature set the same.
- Add backward compatibility. If I can do this in a nice way then it can live in the library for a while before we remove it.
- Add in hooks support. We may as well do this at the same time as we'll require a higher version of React Native, which I believe is classed as a breaking change. Plus it's a good reason for people to update if they want to use the "new shiny".
- Merge into
master
as a breaking change. - Work on adding the new features where possible (eg. Adding the
isInternetReachable
flags). Release these as minor versions when ready.
from react-native-netinfo.
I think this looks good, as a typescript consumer of the "expensive or not" information, and isConnected etc, and also someone thinking about a breaking change in @rnc/device-info.
It seems like a fair change with useful API on first glance. The only thinking-out-loud idea I had while reading it was that if you wanted to make sure you were future proof at the API level you might want to make sure you modeled after the underlying network stack (note that isconnected and isinternetreachable are sort of like different layers in the ISO stack right? so maybe have a kind of yes/no lookup on those layers, but I'm not advocating that - it sounds terrible as I type it, just thinking out loud about what the info means as it comes through this module as maybe a criteria for correct thinking on API produced)
As a consumer I love a model where you introduce new API and deprecate/yellow-box (with docs to suppress) in one major rev, then purge deprecated API in second major rev. As a maintainer I feel the load of extra code but I don't mind personally. So I would do that if possible, if it were me.
from react-native-netinfo.
just as an aside on the term "future proof" as a ripoff of the joke about making things idiot-proof, the world is always inventing a worse future, so dunno about "future proof" but obviously we all (maintainers) try
from react-native-netinfo.
This has been released in v3.0.0 🎉
from react-native-netinfo.
Related Issues (20)
- "SSID, BSSID, IP" not compliant with Huawei App market Policies HOT 4
- getting logout/crash application when switch the network HOT 1
- Can't get wifi ssid on IOS HOT 1
- I keep getting this error when i install the package, how can i fix it HOT 4
- isInternetReachable returns true while there is no data connection but my wifi is on and connected HOT 5
- let me explain clearly I connected my device to another device's hotspot and the device I connected to has no access to the internet however Netinfo.isInternetReachable returns true. HOT 1
- Fix TypeSafety for useNetInfo hook results
- NetworkCallbackConnectivityReceiver.register android.net.ConnectivityManager$TooManyRequestsException HOT 12
- Execution failed for task ':react-native-community_netinfo:compileDebugJavaWithJavac' HOT 8
- Invalid hook call
- NetInfo Library: isConnected Value Not Updating After Reconnecting to Internet HOT 5
- errors as a when using the netinfo fetch command when I had a javascript fetch in my component HOT 1
- Can I get MAC Address on both platform? HOT 1
- Error: @react-native-community/netinfo: NativeModule.RNCNetInfo is null. HOT 1
- Internet Connectivity Check Not Triggering When App is Killed - @react-native-community/netinfo HOT 1
- Possible no hotspot management
- Task :app:lintAnalyzeDebug FAILED when gradle build HOT 2
- Default Gateway IP
- Possible issue during gradlew assembleRelease for netinfo library checks HOT 2
- How to Configure code for dynamic NetInfoCellularGeneration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-netinfo.