Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with expo #618

Open
ariran5 opened this issue Nov 5, 2022 · 3 comments
Open

Work with expo #618

ariran5 opened this issue Nov 5, 2022 · 3 comments

Comments

@ariran5
Copy link

ariran5 commented Nov 5, 2022

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

@balgamat
Copy link

balgamat commented Oct 3, 2023

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

@balgamat
Copy link

balgamat commented Oct 3, 2023

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).

@vlev322
Copy link

vlev322 commented Dec 27, 2023

@balgamat thank you!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants