segmented-control icon indicating copy to clipboard operation
segmented-control copied to clipboard

Work with expo

Open ariran5 opened this issue 3 years ago • 3 comments

please add to docs, expo users can

import SegmentedControl from '@react-native-segmented-control/segmented-control/js/SegmentedControl.js';


    <SegmentedControl
        style={{
          width: 300,
          height: 32
        }}
        values={['One', 'Two']}
        selectedIndex={selectedIndex}
        onChange={(event) => {
          setState(event.nativeEvent.selectedSegmentIndex);
        }}
      />

and it works

ariran5 avatar Nov 05 '22 10:11 ariran5

It doesn't for me, at least not in the web.

balgamat avatar Oct 03 '23 18:10 balgamat

Ok, so the key to making this work is to strip away the flow types. Either with babel or webpack (depending on your bundler and platform).

balgamat avatar Oct 03 '23 18:10 balgamat

@balgamat thank you!!!!!!

vlev322 avatar Dec 27 '23 15:12 vlev322