Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dangerouslySetInnerHTML prop for a React DOM element should be in the form of {__html: ...} #15

Closed
ShivNandanJha opened this issue Sep 16, 2023 · 3 comments

Comments

@ShivNandanJha
Copy link

web-screenshot-16-09-2023 (1)

@mozi47
Copy link

mozi47 commented Sep 17, 2023

{typeof data?.desc === 'string' &&
          <div
            className={styles.description}
            dangerouslySetInnerHTML={{__html: data.desc }}
          />}

This is how I solved this error.

@Aniket-x-code
Copy link

Thanks @mozi47 it really helped.

@ShivNandanJha
Copy link
Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants