i am currently learning motoko for my backend. I just want to know how to connect my react framework with motoko? i searched the docs already but cant seem to find the answer
still im currently looking a way to connect my react framework. at the moment im using the basic dfx new tags to create. but im more familiar with react as my frontend
It is not possible to directly use React within Motoko code as they are different programming languages. However, you can create a separate React frontend for your Motoko backend. Set up your backend in Motoko, define an API, and make HTTP requests or use the IC Canister SDK in your React components to communicate with the backend.
This way, you can connect your React frontend with your Motoko backend and utilize React for your frontend development while leveraging Motoko for the backend logic.