question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing SegmentedButtons throws error (v5.0.0-rc.4)

See original GitHub issue

Current behaviour

Navigating to Screen that imports SegmentedButtons throws error:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Expected behaviour

SegmentedButtons component should be usable on this v5 release candidate

Code sample

import { SegmentedButtons } from 'react-native-paper';
...
        <SegmentedButtons
          value={form.buildType}
          onValueChange={setBuildType}
          buttons={[
            {
              value: '...',
              label: '...',
            },
            ...
          ]}
        />

What have you tried

Tried: deleteing package-lock.json, npm uninstall, npm install react-native-paper@5.0.0-rc.4

Your Environment

software version
ios or android ios
react-native 0.69.3
react-native-paper 5.0.0-rc.4
node v18.2.0
npm or yarn npm 8.9.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lukewalczakcommented, Sep 5, 2022

Hey @matthewlese, 5.0.0-rc.5 has been released.

0reactions
idiomatticcommented, Sep 1, 2022

ok, sounds great @lukewalczak !

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript type exports fail when type is imported from a module
When exporting types in TypeScript that were imported from another library, transpiled file throws error about missing import.
Read more >
Ext React Segmented button throws an error when provided a ...
I'm using ExtReact and I have a SegmentedButton. Based on the kitchen sink example I should be able to provide the SegmentedButton with...
Read more >
Common Error Details - Snowpack
If you're getting this error while trying to import a local file, the fix usually looks like this: - import myFile from 'myFile.js';...
Read more >
SAP Transport Return Code Status - Wiki
Method execution error. RC = 12, import is cancelled. Common issue: • Import is canceled due to object missing. • Objects are not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found