Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Ansonhkg
Copy link
Contributor

@Ansonhkg Ansonhkg commented Mar 26, 2025

WHAT

An example of setting up a Lit Context provider that initialises the chain manager, so that all children can consume the APIs.

  • LitContext.tsx -> Provides a context for the whole app
  • StateWrapper.tsx -> Manage states of the fetch/contract calls (eg. isLoading, isEmpty, isError, etc.)
  • GetAppsByManager.tsx -> The filename maps 1:1 to the getAppsByManagerAPI. It renders a list of apps from the chain manager.

Here is how your set the return type as return type of the getAppsByManager API.

image image

Copy link

vercel bot commented Mar 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vincent ❌ Failed (Inspect) Mar 26, 2025 3:01am

@Ansonhkg Ansonhkg requested a review from awisniew207 March 26, 2025 03:00
@Ansonhkg Ansonhkg marked this pull request as draft March 26, 2025 03:00
@Ansonhkg Ansonhkg requested a review from spacesailor24 March 26, 2025 03:04
@Ansonhkg Ansonhkg changed the title [Example] Using Context Provider for contract APIs [Example Only] Using Context Provider for contract APIs Mar 26, 2025
@Ansonhkg Ansonhkg closed this Apr 18, 2025
@Ansonhkg Ansonhkg reopened this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant