0

What is the best way to parse an API response from HTML into react native?

An example of a string I get back from the API is:

<> "description_html": "<p>This warm and welcoming home offers six sizable bedrooms and three full bathrooms. Step inside to a beautiful interior, featuring hardwood flooring and elegant chandeliers. You&#39;ll love cooking in the open concept kitchen that&#39;s equipped with stainless steel appliances and tons of storage space. There&#39;s the added convenience of in-unit laundry. Even better, enjoy a lush backyard, providing a calm hideaway where you can relax and decompress after a busy day. Parking spaces available on a first come first serve basis.</p><p>This home boasts an ideal location in Rainier Valley. It&#39;s a short walk to Safeway for groceries and Walgreens is a quick drive down the road for other necessities. There are plenty of dining options in the area including Cafe Ibex, Pho Bac, and Emerald City Fish &amp; Chips. Spend the afternoon outdoors at Mt. Baker Beach or York Park. It&#39;s only a few miles from downtown where you&#39;ll find Pier 55 and the Seattle Aquarium. Getting there is also easy with access to the I-5 and the Light Rail nearby.</p>" </>

Any help appreciated!

1 Answer 1

1

Using a third-party package is probably your best option. I've used this one in the past: https://github.com/archriss/react-native-render-html and it worked well.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.