2

I'm trying to make an Image into hexagon in react native but I don't know how to do that. Here is the expected result: hexagon

mina
  • 21
  • 3

1 Answers1

1

I was able to create a perfect hexagon Image View using react-native-shape-image-view dependency.

Here is the screenshot:- screenshot

But it requires following changes before we can use it.

  1. change buildToolsVersion "23.0.1" to buildToolsVersion "25.0.0"
  2. change import of PropTypes from 'react' to import PropTypes from 'prop-types' inside node_modules\react-native-shape-image-view\lib\hexagonView.

You have to change this import in every file where PropTypes are used. inside

node_modules\react-native-shape-image-view\lib\

You may face some linking issues in the installation of this dependency but it will work. Refer Installation instruction at given link of this dependency.

Chirag Sharma
  • 888
  • 6
  • 18