skip to Main Content

I have updated my project to Expo SDK 51 and vector icons stopped working. It doesn’t show the icons anymore when I start the project from Expo Go.

I have tried updating babel config as suggested from the web:

module.exports = function (api) {
  api.cache(true)
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      'react-native-reanimated/plugin',
      'transform-inline-environment-variables',
      [
        'module-resolver',
        {
          alias: {
            '@': './src',
            '^react-native-vector-icons(/.*)?$': '@expo/vector-icons$1',
          },
        },
      ],
    ],
    env: {
      production: {
        plugins: ['react-native-paper/babel'],
      },
    },
  }
}

2

Answers


  1. I did like this,

    <SymbolView
      name="camera.viewfinder"
      tintColor={color}
      size={18}
      fallback={
        <FontAwesome6 size={16} name="camera" color={color} />
      }
    />
    

    I hope it helps.

    Login or Signup to reply.
  2. I Had the same issue upgrading from expo 50 to 51.

    Following this github issue https://github.com/callstack/react-native-paper/issues/4295

    Removing yarn.lock / package.lock.json
    Removing node_modules
    yarn / npm i

    This fixed it for me without any babel config changes.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search