About 97 percent of teens report using at least one of the seven most popular social media platforms — Facebook, Instagram, YouTube, Twitter, Reddit, Snapchat and Tumblr — according to one poll. At the same time researchers, parents and even teens themselves have raised concerns about whether social media use can lead to mental health problems, including symptoms of depression and anxiety.

A recent study looked at the effect of social media use on teens’ mental health over a three-year period and found that though the risk of certain mental health issues does go up with social media use, the overall picture is mixed, suggesting that the platforms offer both risks and rewards.

Consider screen-free rooms in the home; screen-free times, such as family meals; and device curfews, such as no screen time after 8 pm on weeknights.

The researchers analyzed data collected over three years from nearly 6,600 adolescents between the ages of 13 and 17. The teens were part of the Population Assessment of Tobacco and Health (PATH) study, a nationally representative study of U.S. adolescents. Every year, the participants were asked how much time they spent on social media. They also answered questions about their mental health.

The researchers found that 17 percent of participants reported spending no time on social media. Among those who did use social media, 32 percent spent less than 30 minutes per day; about 31 percent said they spent between 30 minutes and three hours; 12 percent reported they used social media between three and six hours; and eight percent said they spent more than six hours per day.

Nearly 50 percent of the teens using social media said they experienced no mental health problems. Internalizing problems, such as feelings of depression and anxiety, and social withdrawal, affected about nine percent of respondents. About 14 percent said they experienced only externalizing mental health problems, such as acting out and aggression. Roughly 18 percent reported experiencing both internalizing and externalizing problems.

Teens who spent any time on social media each day were more likely to report internalizing behaviors or both externalizing and internalizing behaviors, than kids who spent no time on social media sites. Those engaged on social media for three hours a day had the greatest likelihood of reporting depression and anxiety. Social media use was not significantly associated with reports of externalizing behaviors alone.

The study found no association between gender and social media use and mental health problems. “It could be that boys and girls have different interactions on social media that could affect their mental health differently,” Kira Riehm, lead author of the study, told TheDoctor, adding that the way social media use was measured in the study could not capture the differences in these interactions.

Families who want to keep their screen time in check should have guidelines about screen time in place. Such guidelines could include screen-free rooms in the home; screen-free times, such as family meals; and device curfews, such as no screen time after 8 pm on weeknights. Riehm suggested parents go online and review the Family Media Use Plan endorsed by the American Academy of Pediatrics.

People need to remember that social use has a lot of benefits as well, said Riehm, a doctoral candidate at the John Hopkins Bloomberg School of Public Health. For example, teens who tend to feel marginalized, such as those identifying as the LGBTQ, can feel validated when they interact with other members of that community on social media. “We need to balance the pros and cons of social media, and teach teens to interact critically with what they see on there.” She also urges teens to view online content with a critical eye, and not take what they see posted there at face value.

The study is published in JAMA Psychiatry.