forked from App2Sales/react-native-switch-selector
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Welp, I was just trying to replicate the examples, but this SwitchSelector is not working for me
import SwitchSelector from 'react-native-switch-selector';
...
const Homescreen =() => {
...
const options = [
{label: '01:00', value: '1'},
{label: '01:30', value: '1.5'},
{label: '02:00', value: '2'},
];
return (
...`
<SwitchSelector
options={options}
initial={0}
onPress={value => console.log(`Call onPress with value: ${value}`)}
/>
)
...
}
Error:
JSX element class does not support attributes because it does not have a 'props' property.ts(2607)
'SwitchSelector' cannot be used as a JSX component.
Its instance type 'SwitchSelector' is not a valid JSX element.
Type 'SwitchSelector' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, refsts(2786)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels