I use sectionlist and also have a team array inside data array, when i register a player, sectionlist not updated on api untill i reload the app

Viewed 31

this is sectionlist data which i get from post api

 const getAllMatches = async () => {

    await fetch(APIS.Matches, {
      method: 'GET',
      headers: {
        Authorization: user,
        Accept: 'application/json',
        'Content-Type': 'application/json',
      },
    })
      .then(response => response.json())
      .then(({matches}) => {
        setAllMatches(matches);
      })
      .catch(error => {
        return console.error(error);
      });
  };
1 Answers

You should have a look SectionList's extraData prop. extraData update the list when data is updated

Related