![]() ![]() Some shared components that might be helpful It uses superagent to do HTTP requests and sets headers and other things like that. It uses the cssVar pattern from the sample Facebook apps. Info is currently stored as json to the local file system. It knows things that are different per environment like what API server to talk to. There is a model called Environment that gets bootstrapped from Objective-C. ![]() The Components add and remove listeners to the Stores. Actions tend to use the API Services and dispatch an event. The urls must be able to represent the entire navigation stack, so that means they can be recursive like my friend's friend's friend's feed (sample://dashboard/follows/john/follows/sarah/follows/amy/posts). The Router handles parsing different routes depending if you are logged in or not. Making everything addressable by URL is great for deep linking and forces each screen to be able to load all on it's own from simple data. There is some stuff to make "related" url navigation look "right" (push and pop). We parse urls to determine the route stack. The sole method of navigation (what's showing on the screen and where the back button goes) is via urls. We'll get there, but we're still working on the iOS version. Not that there's a staging server at this point, but it's an example of how to compile things via the command line. You can compile and put it on the phone with: npm run install:staging Compile app for the test environment: npm run compile:test.Make sure you have the 9.0 simulators installed in XCode.There is also an example of how to run it on Travis CI: The integration tests are run using Appium. For example, there is a user bleonard (password: "sample") that you can log in as. ![]() It has sample data in the models.js file. The data is only stored in memory, but it should produce a more realistic environment. There is a server that the app hits for data. To run from command line try: react-native run-android.And for the sample server: adb reverse tcp:3000 tcp:3000.You might need to do this to run it in Android Studio or on real device: adb reverse tcp:8081 tcp:8081.At this time, we're mostly demonstrating architectural concepts. The features (or styling) isn't the main point. The app itself is vaguely like twitter/tumblr. This app is a working app in which we implement new ideas or those that have worked for us so far. At TaskRabbit, we are trying to understand the best way to build React Native apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |