V
V
Vladimir Golub2019-08-21 11:14:07
React
Vladimir Golub, 2019-08-21 11:14:07

How to use jss with content that comes from the server?

How to use jss if we get article texts with markup from the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Didenko, 2019-08-21
@RazerVG

From the React documentation:

function createMarkup() {
  return {__html: 'First · Second'};
}

function MyComponent() {
  return <div dangerouslySetInnerHTML={createMarkup()} />;
}

Read about dangerouslySetInnerHTML and the question will disappear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question