1.0.31 • Published 2 years ago

laniakea-core-ts v1.0.31

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

NPM version GitHub

demo

example of project (Git)

The only hooks are currently supported:

useState useRef useEffect (only one fn per component in ver 1.0.3)

1.0.3 version is allowed to use setState hook within fragments:

const FragmentWithStateHook = () => {
  const [st, setSt] = useState(1);
  const changing = () => setSt((prev: number) => prev + 1);
  return (
    <>
      <button onClick={changing}>{st.toString()}</button>
    </>
  );
};

1.0.3 version is allowed to use more than one hook:

  /* more you can see in 'MultState.tsx' as example */
  const [st, setSt] = useState("");
  const [counter, setCounter] = useState(1);

1.0.3 version is allowed to return element:

return isLoading ? <Preloader /> : <Examples />;
1.0.31

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago