You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/with-typescript-react-native/App.tsx
+11-4
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,19 @@ export default function App() {
8
8
9
9
useEffect(()=>{
10
10
asyncfunctiongetAlbums(){
11
-
constdb=newDatabase(`${DATABASE_URL}`);
11
+
letdb
12
+
try{
13
+
db=newDatabase(`${DATABASE_URL}`);
12
14
13
-
constresult=
14
-
awaitdb.sql('USE DATABASE chinook.sqlite; SELECT albums.AlbumId as id, albums.Title as title, artists.name as artist FROM albums INNER JOIN artists WHERE artists.ArtistId = albums.ArtistId LIMIT 20;');
15
+
constresult=
16
+
awaitdb.sql('USE DATABASE chinook.sqlite; SELECT albums.AlbumId as id, albums.Title as title, artists.name as artist FROM albums INNER JOIN artists WHERE artists.ArtistId = albums.ArtistId LIMIT 20;');
0 commit comments