
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@native-base/formik-ui
Advanced tools
@native-base/formik-ui is the official NativeBase - Formik bindings by NativeBase Team. @native-base/formik-ui provides with form components integrated with formik hooks out of the box, Each component makes use of Formik's context, therefore you need to have Formik installed in your project, after that all you have to do is write your validationSchema, build your Form using NativeBase Formik UI components and wrap that with <Formik/> , rest will be taken care by us.
import React from 'react';
import {
CheckboxControl,
Text,
SubmitButton,
ResetButton,
Box,
ButtonGroup,
} from '@native-base/formik-ui';
import { Formik } from 'formik';
import { Heading, Center, NativeBaseProvider } from 'native-base';
import * as Yup from 'yup';
const validationSchema = Yup.object().shape({
tnc: Yup.boolean().equals([true], 'Terms and Condition must be checked !'),
newsletter: Yup.boolean(),
});
function FormikCheckboxBasicExample() {
const onSubmit = async (values) => {
await new Promise((resolve) => setTimeout(resolve, 1000));
console.log(values);
};
return (
<Formik
initialValues={{
tnc: true,
newsletter: false,
}}
onSubmit={onSubmit}
validationSchema={validationSchema}
>
{({ values, errors }) => (
<Box>
<Heading>Checkbox FormControl</Heading>
<CheckboxControl name="tnc" label="Checkbox Control Label" mt={4}>
<Text mx={2}>Terms and Conditions</Text>
</CheckboxControl>
<CheckboxControl name="newsletter" mt={4}>
<Text mx={2}>Subscribe to Our Newsletter</Text>
</CheckboxControl>
<Box pb={4} />
<ButtonGroup spacing={6}>
<SubmitButton colorScheme="teal">Next</SubmitButton>
<ResetButton colorScheme="yellow">Reset</ResetButton>
</ButtonGroup>
<Box mt={4} bg="gray.100" p={3}>
<Heading size="sm" mb={2}>
Current State
</Heading>
Values: {JSON.stringify(values, null, 2)}
Errors: {JSON.stringify(errors, null, 2)}
</Box>
</Box>
)}
</Formik>
);
}
export default function () {
return (
<NativeBaseProvider>
<Center flex={1}>
<FormikCheckboxBasicExample />
</Center>
</NativeBaseProvider>
);
}
# Using Yarn
yarn add @native-base/formik-ui
# Using NPM
npm i @native-base/formik-ui
NativeBase Formik UI has Formik, NativeBase and some various other libraries as Peer Dependencies. So make sure to have those packages installed to your project to make use of NativeBase Formik UI.
# Using Yarn
yarn add formik native-base@next react-native-svg @expo/vector-icons styled-components styled-system react-native-safe-area-context @react-native-picker/picker
# Using NPM
npm i formik native-base@next react-native-svg @expo/vector-icons styled-components styled-system react-native-safe-area-context @react-native-picker/picker
To validate the form fields, we recommend using Yup.
# Using Yarn
yarn add yup
# Using NPM
npm i yup
See the Contribution guide to learn how to contribute to the repository and the development workflow.
MIT © NativeBase
FAQs
NativeBase Formik Integration
The npm package @native-base/formik-ui receives a total of 27 weekly downloads. As such, @native-base/formik-ui popularity was classified as not popular.
We found that @native-base/formik-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.