debsouryadatta / react-native-souryax-explore

react-native-souryax-explore

Home Page:exp://u.expo.dev/update/f75c5466-be6e-4540-8ba2-3c2574d122a1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps of Development

Initiation & Navigation

  1. npx create-expo-app
  2. npm install @react-navigation/native, npx expo install react-native-screens react-native-safe-area-context -> For Navigation
  3. npm install @react-navigation/stack -> For Stack Navigation, npm install @react-navigation/bottom-tabs -> For Bottom Tab Navigation
  4. Creating the Home.js,Fav.js,Profile.js,Search.js in the App/Screens dir
  5. Creating the TabNavigation following the documentation of react-navigation and also including the icons from expo/vector, Putting NavigationContainer in the App.js

Creating the Home Screen

  1. Downloading the assets from github
  2. Creating the Home page, creating the Header component
  3. Creating a shared folder to define the names of the colors(to mainain a consistency)

Google Maps

  1. Enabling the Android Maps Sdk and Places Api in the console.cloud.google.com and also creating a new API key

  2. Copying the api key in the app.json file

  3. npx expo install react-native-maps - to get the map view

  4. Creating the GoogleMapView component inside the Home page

  5. Issue in MapView component -> Solved by downgrading the react-native-maps version

  6. npx expo install expo-location -> For accessing my location, following the docs for using this package

  7. Now I got the problem of the error with the MapView, actually I gave the name of the root dir same as the package name(i.e. react-native-maps), then I changed it

  8. Copying the useEffect for location to the App.js from the docs

  9. Creating a context to share the location data with the other components, geting the context in the GoogleMapView component andf using it

  10. Adding google fonts in our app(Storing the downloaded fonts in our assets files), npx expo install expo-font, then using the useFont hook in the App.js to load the fonts in any component

  11. Adding Marker on maps -> in the GoogleMapView component

Other components in home screen

  1. Creating the CategoryList and the CategoryItem components
  2. npm i axios, creating a func for fetching the places api in the GlobalsApi.js and calling the func in the Home.js
  3. Creating the Placelist and the PlaceItem components
  4. Selecting the category using setSelectedCategory func in the Home.js and the CategoryList.js
  5. Putting the place markers, passing the placeList as a props to the GoogleMapView component then Creating the PlaceMarker component and mapping the placelist with the PlaceMarker component

Place Details Modal

  1. Creating new Stack navigation for the PlaceDetails component(Modal type presentation), also creating the onPress navigate function in the PlaceList component passing the place as params
  2. Creating the onDirectionClick func to open the directions in the PlaceDetails component
  3. Creating the PlaceDetailItem component
  4. Creating the SharePlace function in the Share.js, to use in the PlaceDetailItem component

Search Page

  1. Creating the Search Page, creating the GoogleMapViewFull component, creating the searchByText func in the GlobalsApi.js and using it in the Search.js
  2. Creating the Searchbar component, npx expo install expo-linear-gradient -> For the gradient Searchbar
  3. Creating the BusinessList and the BusinessItem components to show up the below cards, using the earlier made PlaceDetail component in the BusinessList component
  4. Using the setSearchText func in the Search.js and the Searchbar component to search the places

Publishing

  1. npm install -g expo-cli, expo publish
  2. Link of published app: exp://u.expo.dev/update/f75c5466-be6e-4540-8ba2-3c2574d122a1

TODO: Fav Section and the Profile section

About

react-native-souryax-explore

exp://u.expo.dev/update/f75c5466-be6e-4540-8ba2-3c2574d122a1


Languages

Language:JavaScript 100.0%