React Fiber is an ongoing reimplementation of React's core algorithm. It is the culmination of over two years of research by the React team.
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private OkHttpClient getCacheClient(final Context context) { | |
| Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = new Interceptor() { | |
| @Override public okhttp3.Response intercept(Chain chain) throws IOException { | |
| okhttp3.Response originalResponse = chain.proceed(chain.request()); | |
| if (isNetworkAvailable(MainApp.getContext())) { | |
| // Internet available; read from cache for 1 day | |
| // Why? Reduce server load, better UX | |
| int maxAge = 60 * 60 * 24; | |
| return originalResponse.newBuilder() | |
| .header("Cache-Control", "public, max-age=" + maxAge) |
NewerOlder