@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
16 lines • 367 B
JavaScript
import * as React from 'react';
export const FormContext = /*#__PURE__*/React.createContext({
formRef: {
current: {
fields: new Map()
}
},
errors: {},
onClearErrors: () => {}
});
if (process.env.NODE_ENV !== 'production') {
FormContext.displayName = 'FormContext';
}
export function useFormContext() {
return React.useContext(FormContext);
}