0

I'm using the Checkbox component from react-native-paper and this emoji is appearing instead of a checkbox

Baby emoji instead of checkbox screen

Import

import { Checkbox } from "react-native-paper";

Code

<Checkbox  
    status={isVisible?'checked':'unchecked'}
    onPress={()=>{
        setVisible(!isVisible);
    }}
/>
Yash Brid
  • 1
  • 1

1 Answers1

0

Does this code snippet help inserted below? It is copied from here, and uses checked instead of isVisible.

import * as React from 'react';
import { Checkbox } from 'react-native-paper';

const MyComponent = () => {
  const [checked, setChecked] = React.useState(false);

  return (
    <Checkbox
      status={checked ? 'checked' : 'unchecked'}
      onPress={() => {
        setChecked(!checked);
      }}
    />
  );
};

export default MyComponent;
andexte
  • 181
  • 6