import React, {useState} from "react";
import axios from 'axios';
function TreatmentRecordPanel() {
const [treatId, setID] = React.useState('');
const [treatCourseId, setCourse] =
React.useState('');
const [type, setType] = React.useState('');
const [category, setCatagory] =
React.useState('');
const [Pname, setName] = React.useState('');
const [startDate, setDate] =
React.useState('');
function patientTreatmentRecord(){
axios.get(`http://localhost:8080/GetAllPatients`)
.then( (response) => {
var resData = response.data;
let data = JSON.stringify(resData);
window.alert("Response recieved from server = " + data);
});
}
I am creating a react app where I have to store patients' data on local Database using SQlite. I want the data from the table to be displayed on to a table. how do I go about it from here. any help will be mush appreatiated.