skip to Main Content

How do you allow users to change font size in a react native app? For example the one in Telegram.

enter image description here

2

Answers


  1. I don’t know about Telegram but you can set the size of your font to a state and change the state by taking user’s input value.

    I hope that helps!

    Login or Signup to reply.
  2. It’s been 3 years already but I could mention some solutions:

    1. Use React Context for holding fontSize, you can consume it everywhere. Remember to persist data on changes and load the data then set value to the context.

    2. Use can use zustand and persist middleware to store the value throw middle ware, use AsyncStorage to store the value. It quite simple and I am using this one

    3. any state management also works but you will need to think about it twice.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search