I created an easy way to use Create React App with Dfinity

I wasn’t quite happy with the default frontend workflow so I created an easy way to use Create React App with Dfinity/IC.

First create your project

npx create-react-app my-app --template dfn
cd my-app

Start the backend

dfx start --background
dfx canister create --all
dfx build
dfx canister install test

Now you can use CRA as usually

npm start

Still super alpha but it should at least work :slight_smile:
If it doesn’t then let me know!

For now it’s just for development but I’m definitely going to look into deploying the result of npm build into a canister in an easy way.

repo:
https://github.com/MioQuispe/cra-template-dfn

10 Likes