mirror of
https://github.com/seigler/cra-dash-sdk-demo
synced 2025-07-26 04:36:08 +00:00
Add SDK, call new
This commit is contained in:
parent
59762be38e
commit
c51a275b3e
3 changed files with 1427 additions and 4 deletions
1417
package-lock.json
generated
1417
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -6,6 +6,7 @@
|
||||||
"@testing-library/jest-dom": "^4.2.4",
|
"@testing-library/jest-dom": "^4.2.4",
|
||||||
"@testing-library/react": "^9.4.0",
|
"@testing-library/react": "^9.4.0",
|
||||||
"@testing-library/user-event": "^7.2.1",
|
"@testing-library/user-event": "^7.2.1",
|
||||||
|
"dash": "^1.1.0",
|
||||||
"react": "^16.12.0",
|
"react": "^16.12.0",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.12.0",
|
||||||
"react-scripts": "3.3.0"
|
"react-scripts": "3.3.0"
|
||||||
|
|
13
src/App.js
13
src/App.js
|
@ -1,14 +1,23 @@
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
|
import Dash from 'dash';
|
||||||
|
|
||||||
import logo from './logo.svg';
|
import logo from './logo.svg';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
const [status, setStatus] = useState('Loading...');
|
||||||
|
// try {
|
||||||
|
const sdk = new Dash.SDK();
|
||||||
|
// } catch (e) {
|
||||||
|
// console.error('Error at "new":', e);
|
||||||
|
// setStatus('Error at "new" (see console)')
|
||||||
|
// }
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<header className="App-header">
|
<header className="App-header">
|
||||||
<img src={logo} className="App-logo" alt="logo" />
|
<img src={logo} className="App-logo" alt="logo" />
|
||||||
<p>
|
<p>
|
||||||
Edit <code>src/App.js</code> and save to reload.
|
Status: {status}
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
className="App-link"
|
className="App-link"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue