export const GroupList = props => {
const[groups, setGroups] = useState([]);
useEffect(()=>{
retrieveGroups();
})
const retrieveGroups = () => {
BackendService.getAllGroups()
.then(response => {
setGroups(response.data);
})
.catch(e => {
console.log(e);
});
return(...)
}