dfinity-react-ts-tailwind-starter
dfinity-react-ts-tailwind-starter copied to clipboard
Create DFINITY React App
dfinity-react-ts-tailwind-starter
A starter project for DFINITY similar to Create React App:
Developing
Start a local network:
dfx start
Then, start the dev server:
npm start
Typecheck
npm run types
Canisters don't have types yet, so they're all declared to be any.
Testing
To test canisters, ensure that a local network is running.
The default testing library's async timeout is 1000ms, which is not long enough for a canister response. 5000ms is recommended for each waitFor call. The default Jest timeout may also need to be increased.
Building and Installing
Follow the steps to create canisters, build, and install:
dfx canister create --all
dfx build
dfx canister install --all