@codestacks/react-block
v1.1.4
Published
Block library based for Reactjs
Readme
codestacks React Block
^1.1.0 support react >=18.0.0 <20.0.0
Features
- Supports queue block list
- Plug and unplug using
@codestacks/react-portalandframer-motion
Install
yarn add @codestacks/react-blockUsage
add in your index.tsx
import "@codestacks/react-block/dist/index.css";add in your App.tsx
import {BlockPortal} from "@codestacks/react-block";
const App = () => {
return (
<div>
<BaseUsed/>
<BlockPortal
isVisibleQueueKey={false}
loader={<Loader/>}
defaultMessage="Loading..."
/>
</div>
);
};then in your page
import {block} from '@codestacks/react-block';
import {useEffect} from "react";
const Example = () => {
useEffect(() => {
block.show();
setTimeout(() => {
block.hide();
}, 3000)
}, []);
return (
<div>
sample page
</div>
);
};- block.show
- block.hide
There is also a example that you can play with it:
License
MIT © codestacks
