1.0.0 • Published 1 year ago

typescript-44ms-ootb-logical-context v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

44ms

Valentines Day 4 React Developers 2023 ❤️

Say goodbye to your former troubles

Forms are eazy now

tl;dr You already use React and prefer React & thus prefer 44

Pronounciation

Foh Thah Fohms! / Forty Fo(u)rms / Forty Four'ms / "React" for the forms! Whatever

github.com/peacefultruth/zormu44

MIT LICENSE

API

Xzibit / 44 vs The Current State Of The Art / Form Library Comparison 2023 February

Deprem? Deprem is a turk word for earthq 🇹🇷 Donate to me directly. Or do you need an ls ./tragedy? You can always release fo free.

Yallah

npm install --save react-44ms typescript-44ms typescript-44ms-ootb-all 
import * as React44ms from 'react-44ms';
import { ootb } from "typescript-44ms-ootb-all";

const formCient = React44ms.React.createClient(ootb());
const App: React.FunctionComponent = () => {
  return (
    <React44ms.React.Provider client={formCient}>
interface AnEmailInMyFormExpects {
  value: string;
  error?: string;
}
interface EmailLogicProps {
  ref: React44ms.Api.TypedRef<AnEmailInMyFormExpects>;
}

const EmailLogic44: React44ms.Api.FunctionComponent<EmailLogicProps> = () => {
  const [email, setEmail] =
    React44ms.Api.useState<AnEmailInMyFormExpects["value"]>("");

  const [error, setError] =
    React44ms.Api.useState<AnEmailInMyFormExpects["error"]>(undefined);

...
const EmailLogic = React44ms.React.Reactify(EmailLogic44);
import * as React from "react";

interface EmailProps {
  formRef: React44ms.Api.TypedRef<AnEmailInMyFormExpects>;
}
const Email: React.FunctionComponent<EmailProps> = (props) => {
  const [state, locate] = React44ms.React.useForm(props.formRef);
  const { value, error } = state || {};
  return (
    <div>
      <EmailLogic ref={locate.typedRef} />
      <input value={value} onChange={React44ms.React.Convenient.input.onChange(locate)}/>
...