Importing SegmentedButtons throws error (v5.0.0-rc.4)
See original GitHub issueCurrent 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:
- Created a year ago
- Comments:7 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @matthewlese,
5.0.0-rc.5
has been released.ok, sounds great @lukewalczak !