{"id":20218821,"url":"https://github.com/juliannicholls/react-native-course","last_synced_at":"2025-04-10T15:50:46.108Z","repository":{"id":37102077,"uuid":"225343847","full_name":"JulianNicholls/React-Native-Course","owner":"JulianNicholls","description":"Code from the Stephen Grider React Native course on Udemy at https://www.udemy.com/course/the-complete-react-native-and-redux-course","archived":false,"fork":false,"pushed_at":"2025-03-08T21:38:32.000Z","size":5324,"stargazers_count":12,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T13:37:00.514Z","etag":null,"topics":["react-native","react-navigation"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JulianNicholls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-02T10:08:29.000Z","updated_at":"2025-03-08T21:38:29.000Z","dependencies_parsed_at":"2023-10-10T14:27:56.365Z","dependency_job_id":"a5403125-e929-44ab-908e-a562ddfcb7e0","html_url":"https://github.com/JulianNicholls/React-Native-Course","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FReact-Native-Course","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FReact-Native-Course/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FReact-Native-Course/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulianNicholls%2FReact-Native-Course/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulianNicholls","download_url":"https://codeload.github.com/JulianNicholls/React-Native-Course/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248244892,"owners_count":21071357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native","react-navigation"],"created_at":"2024-11-14T06:40:00.657Z","updated_at":"2025-04-10T15:50:46.080Z","avatar_url":"https://github.com/JulianNicholls.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React-Native-Course\nCode from the Stephen Grider React Native course on \n[Udemy](https://www.udemy.com/course/the-complete-react-native-and-redux-course)\n\n## PROBLEMS\n\nIf you have any unexpected problems, for example where you have exactly the \nsame code as Stephen but you have big red messages instead of an app.\n\n**TRY STOPPING THE SERVER AND RUNNING `npm start` AGAIN.**\n\nThis is particularly true if you have messages like `Cannot load module \"94\"`\nor it disavows knowledge of a file that you've just created\nwhich is truly mystifying :-)\n\nAnother thing is that you can't leave expo running during sleep \nor when you install new npm modules. It *will not work*, and you will get the \nmystifying errors.\n\n## Progress\n\n  Completed latest version of the course\n\n## Differences from Stephen\n\n### Actions\n\nI always create a set of 'types' for the action creators, this avoids any \npossibility of typos between action creators and reducers, e.g.\n\n  ``` \n  dispatch({ type: 'LOAD_POSTS', posts });\n  ...\n  \n  const postsReducer = (posts, action) =\u003e {\n    switch (action.type) {\n      case 'LAOD_POSTS':    // Oops, should be 'LOAD_POSTS'\n        ...\n  ```\n\n### Context\n\nI always create a custom hook for a context which returns the context, chacking\nthat it's valid before returning it.\n\n### First App\n\n* My rn-starter directory is more or less untouched from Stephen's zip file.\n  I have started my first app in a directory called `first`.\n\n* I have styled everything much more in the first app.\n\n* I have added prop types to all the screens and components, because ESLint whines \n  about them being missing :-)\n\n### Food\n\n* I rarely, if ever, use the name `payload` for the data contained in a Redux /\n  reducer action. The main exception to this is when using `redux-promise` which \n  requires that the promised data name has to be `payload`.\n\n* My classes in the foodie app are generally `Restaurant...` where Stephen \n  uses `Result(s)...`\n\n* The filtering in my foodie app is a lot more complicated than Stephen's.\n  In the UK, the Yelp API frequently returns much less information, including\n  an empty or missing `price` field.\n\n  As a consequence of the previous, in addition to the lists with the three \n  tiers of price, I have another list where the price range is unknown.\n\n  Also, so many of the restaurants don't even have a single picture, so I have \n  added a placeholder image to the restaurant lists, and have taken care of it \n  on the restaurant detail page as well.\n\n### Blog\n\n* Where Stephen passes the ID of a post to update or delete, I pass the complete \n  post.\n\n* I have no clue why Stephen removes the call to dispatch for adding posts\n  to the list in memory, necessitating a roundtrip to the server. This would be \n  disastrous in a real application where there are potentially hundreds of posts\n  to load from a remote server.\n\n  Premature optimisation is to be avoided, but when the code is already there \n  and tested, why would you stop using it?\n\n### Track and Track Server\n\n* I always use the terms 'log in' and 'log out', to make a contrast with 'sign up',\n  hence my login route is `/login` rather than `/signin` and my login and signup \n  screens are `LoginScreen` and `SignupScreen` respectively.\n\n* I have checked the return value from `requestPermissionsAsync` so that I can \n  detect the request being denied on iOS and not continue to attempt to get \n  location data.\n\n* My LocationContext is called GeoContext because there were too many things called\n  location(s). it also means that I can use `useGeo()` to return the context, leaving\n  `useLocation()` free for Stephen's thing.\n\n* Stephen is not going the right way about recording. The context\n  already knows whether recording is in progress, it does not need to be \n  communicated from outside, where it's being retrieved from the context anyway...\n\n  His method actually breaks the recording process so badly that he has to spend\n  multiple videos fixing the problem that he created.\n\n* My `_mockLocation` makes a wigglier line than Stephen's by not adding to both\n  latitude and longitude every time. I also slowed the update rate down to every 2s.\n\n### Git client\n\nI have used Git at the command-line for more than 10 years. Over that time, I have tried\nmany different graphical shells for Git, without finding one that was easier\nand nicer to use than the command-line (in my view).\n\nI have now found that [GitKraken](https://www.gitkraken.com) is an excellent\nGit shell and would advise using it to everyone.\n\n### Questions\n\nIf you have any questions about this repository, or any others of mine, please\ndon't hesitate to contact me.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliannicholls%2Freact-native-course","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliannicholls%2Freact-native-course","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliannicholls%2Freact-native-course/lists"}