Question: How to style data in Firebase

twitter logo ・1 min read

Hello!! So right now, a user's input is sent to the database and gets displayed on a refresh. What I want to do is give users the option to bold their text and have Firebase display the bolded text.

I was thinking of using a checkbox (If checked then bold the text) But how can I get Firebase to do that? Is there a way to style data in Firebase or style the output?

twitter logo DISCUSS (2)
markdown guide

One way to do that is you can store users choice in firebase like

isBold: true or false.

So when you display the data just put a condition like if isBold is true then display bold otherwise display normal text.

Classic DEV Post from Jul 1

Learning TypeScript with React - Part 1

Two weeks ago, I decided to pick up TypeScript so I started learning it by creating a Tedx Talks player built together with React. It fetches the videos from the official Tedx Talks Youtube channel for you to watch.

Alex profile image
Learning Design