Trying to understand Edge Functions

This is the function in my app -

 useEffect(() => {
    if (user) {
      axios.post('https://djinrfxsatwhvpnufqvm.supabase.co/functions/v1/hello', {
        name: 'YourName',
      }, {
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${user.token}`
        }
      })
      .then(response => {
        setFunctionResponse(response.data.message);
      })
      .catch(error => {
        console.error('Error:', error);
        setFunctionResponse('Error occurred');
      });
    }
  }, [user]); 
Was this page helpful?