since expo doesn't support gif images as splashscreen, i am trying to use gif as json a file. Is it possible to use json file in app.json. If yes, how? Any help would be appreciated.
2 Answers
Yes, you can place json file in your project and use it by importing from the relative path.
import animation from './animation.json';//if the json file exists in the same folder In the case your project is typescript based you should add "resolveJsonModule": true into "compilerOptions" in tsconfig.json file.
{ "compilerOptions": { //... "resolveJsonModule": true, //... } } - There would be right answer if you are only serious to show a git file as Splash https://stackoverflow.com/a/49403026/6602400
you should use some react-native packages such as Lottie or Skottie . but I do recommend using Lottie on Expo Duo to the many many many errors with Skottie. but if you want to use it on React-Native CLI I personally prefer Skottie. cause it's way more efficient and handles performance a lot smoother
YOUR CALL
Skottie => npm i react-native-skottie
or
Lottie => npm i lottie-react-native
Happy Coding