How do I use ReactJS with ServiceNow?

Georgia2
Mega Contributor

Hello! I am trying to create a widget in ServiceNow using ReactJS. I am following this tutorial (https://codecreative.io/blog/react-component-in-service-portal/) but it is not working in my case. Do you have any suggestions? I have attached the HTML and JS code I have that works, but transferring it into ServiceNow does not work. Do you have any suggestions as to where to look or what am I doing wrong?

 

 

 

7 REPLIES 7

Jace Benson
Mega Sage

I'd reach out to Travis from that site.  https://codecreative.io/contact/

He has his email listed there.

What errors are you getting, can you share the steps you took that deviated from his steps?  

I have some errors on the editor not recognising HTML tags in js, but I ignored it since in his screenshots I see that he has as well. I do not have any errors in the console beside the following and I do not know how to solve it. 

SyntaxError: Unexpected token '<'

I will take your advice and email him for more info. Will post and information I use that I find useful.

Ujjawal Vishnoi
Mega Sage
Mega Sage

Hi Georgia,

 

Have created the JS include for minified files? Also make sure you are using the same portal where you have added the JS include in theme.

 

Regards,

Ujjawal

Yes I verified that and they are added. When I find a solution I will post it here.