A wrapper around kycdao-js-sdk for React and Next.js
The package had not been published yet
npm install https://github.com/kycdao/kycdao-react-sdk
- Set up the
KycDaoProvider
component
import { KycDaoProvider } from 'kycdao-react-sdk';
const App = () => {
const nearNetworkEnv = 'testnet';
// you can override the default settings here
const config = {};
return (
<div>
<KycDaoProvider networkId={nearNetworkEnv} config={config}>
<KycDaoComponent />
</KycDaoProvider>
</div>
);
};
- Use the
useKycDao()
hook to access thekycDao
instance
import { useKycDao } from 'kycdao-react-sdk';
const KycDaoComponent = () => {
const { kycDao } = useKycDao();
// use the kycDao instance
return <div>{/* Your view here */}</div>;
};
Check out the KycDaoExample.
- Run the library watcher
yarn start
- Run the demo
cd example
yarn install
yarn start
- Run the tests
yarn test