Skip to main content

Setup the provider

Setting up the Provider is an important part during the initialization. Since the application uses Redux for state management, you have to wrap the application with the Redux Provider. Thankfully, we created the EthyleneProvider to simplify the setup process.

  • Note: Do not misunderstand the Provider as WEB3 Provider. This part is only related to state management.

Wrapping the Application

index.tsx
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { EthyleneProvider } from "ethylene/utils";

ReactDOM.render(
<React.StrictMode>
<EthyleneProvider>
<App />
</EthyleneProvider>
</React.StrictMode>,
document.getElementById("root")
);

Now you should be good to go to start connecting your wallet and creating the dApp!

API

type Props = {
children: ReactNode;
};