In my TS React app nothing renders (ReactDOM.render
is called in a different file)
App.tsx:
import * as React from 'react';
import './App.css';
import name from './db/db';
const App = () => {
return (
<main>
<h2>Chat App</h2>
<p>hello {name}</p>
</main>
);
}
export default App;
db/db.ts:
import Client from '@replit/database';
const db = new Client();
db.set('name', 'world');
let name: string;
db.get('name').then((value) => {
name = value;
});
export default name;
I don't get any errors but nothing renders