Is there a way to add user clicked items in a separate page called history, also make favorite items in a page

    1. I have a history page in my app in which there is nothing but a para which says: “Your history is empty” and also there is a disabled button labeled as Clear History .

If a user clicks on a listed word in the main page as below picture,

then the clicked word should be added in the history page and the default para should be vanished and also the button should be enabled and be functional (by tapping it should clear the user history and the default paragraph should be back).

    1. And if a user wants to make an word favorite by clicking the empty heart icon in the single page,

      then the favorites should be added to the favorite page and also it has a disabled button by default which will be enabled if a user make favorite words by clicking the heart and by clicking the favorite data should be cleared and the default para should be back.
      and the empty heart icon of the favorite word should be changed to filled heart.

You could save a list of favourites which could simply be a list of ID’s of the words. So if you have word

   id: 1,
   word: "shareef",
   english_meaning: "Gentle",
   gender: 'Male'

you could have favourites which simply would be an array with number 1 [1] indicating that this word is favourited.

Then at the favourites page just repeat with the favourites object and you could also stylize the icon depending on if the item is included in the favourites list.

Can you please give a detailed solution as I am a newbie here :grinning:.

Hard to provide concrete solution as I don’t know how your app is built.

On the icon’s component tap event you should apply logic that modifies some favourites data you are collecting in your app by adding an identifier for this specific “word” item. And with this information stored in your app you know which components to show or not to show in your favourites page.