React Native | Redux | tailwind | React Native Navigation | HeroIcons | sanity.io | react-native-animatable |react-native-progress | react-native-maps
-
use command
npx create-expo-app FoodPanda-clone
-
use command go do folder
code .FoodPanda-clone
-
add the web support
npx expo install react-dom react-native-web @expo/webpack-config
-
open project add redux
yarn add @reduxjs/toolkit redux react-redux
-
run
npx expo start
-
add tailwind config file for autocomplete add style to the class name in tailwind autocomplete
npx tailwindcss init -p
-
add tailwind class name library
yarn add twrnc
-
add React Navigation both native and stack
npm install @react-navigation/native @react-navigation/stack
-
add expo react navigation decencies by
npx expo install react-native-screens react-native-safe-area-context
-
add gesture handle by
npx expo install react-native-gesture-handler
-
add icon
yarn add react-native-vector-icons
-
add hero icons
yarn add react-native-heroicons react-native-svg
-
add sanity
npm install -g @sanity/cli
-
init sanity in the project
sanity init
add the project name tofoodpanda-clone
or what ever you want to add use the default dataset configuration :yes
project output path tosanity
this is to make it clean Do you want to use TypeScript :yes
package manage to use for installing dependencies:yarn
-
use sanity
cd sanity
thensanity start
this will ask that do you want to start a development sever instead? :yes
as output is not else you can build make sure you have the tailwind.config.css else it will give error -
add sanity client and sanity image url
yarn add @sanity/client @sanity/image-url
-
create a file name sanity.js in main folder
-
we need to add cors to the sanity project we can do it though studio as well as by using command
cd sanity
to go to sanity folder thensanity cors add http://localhost:19006
thensanity cors add http://localhost:3000
-
deploy the sanity
sanity deploy
use the hostname as you with make sure it is unique -
go to localhost:3000 and go to vision and write
*[_type =="featured"]{ ..., restaurants[]->{ ..., dishes[]->, type->{ name }, } }
-
sometime the error happen
Error: URLSearchParams.set is not implemented
because me may be using the same name as project in sanity and that conflict withpackage.json
andsanity/package.json
change the project name of the sanity project if error happen -
a strange kind of error happen with sanity to i added
yarn add react-native-url-polyfill
to make things work add app top of App,jsimport 'react-native-url-polyfill/auto';
-
add react-currency-formater
yarn add react-currency-formatter
-
add react native animatable
yarn add react-native-animatable
-
add react native progress
yarn add react-native-progress
-
add react native map
npx expo install react-native-maps