laniakea-core-ts
v1.0.31
Published
The laniakea core UI lib (Own react UI lib)
Downloads
8
Readme
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 />;