Skip to content

Commit 3f4a08d

Browse files
authored
Merge pull request #251 from ava-labs/raj/react-interchain
interchain react examples
2 parents 0a5f4e8 + 9bf950b commit 3f4a08d

23 files changed

+4676
-0
lines changed

interchain/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,19 @@ async function main() {
167167
main().catch(console.error);
168168
```
169169

170+
## ReactJS Examples
171+
172+
We have also included few examples to integrate the `interchain` SDK with frontend libraries like ReactJS.
173+
Run the following commands to setup the React example repository. See examples [here](./examples/react-examples/)
174+
175+
```bash
176+
cd examples/react-examples
177+
npm install
178+
npm run dev
179+
```
180+
181+
Now visit the local website to interact with the ICM and ICTT examples.
182+
170183
## Warp Message Parsing
171184

172185
The SDK provides utilities for parsing and working with Warp messages, which are used for cross-chain communication in the Avalanche network. Warp messages are signed messages that can be verified across different chains.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ReactJS Examples
2+
3+
We have also included few examples to integrate the `interchain` SDK with frontend libraries like ReactJS.
4+
Run the following commands to setup the React example repository. See examples [here](./examples/react-examples/)
5+
6+
```bash
7+
cd examples/react-examples
8+
npm install
9+
npm run dev
10+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { globalIgnores } from 'eslint/config'
7+
8+
export default tseslint.config([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<title>Avalanche SDK - React Examples</title>
5+
</head>
6+
<body>
7+
<div id="root"></div>
8+
<script type="module" src="/src/main.tsx"></script>
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)