Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ReactJS example script for SS 4


Go to End


834 Views

Avatar
Faloude

Community Member, 55 Posts

19 May 2017 at 5:29am

I'm trying to build the simplest of scripts: add/remove css class based on DropdownField selection. I have some basic understanding of ReactJS but I'm clueless on how to get a ReactJS script working in SS.

I took a shot at following this: https://docs.silverstripe.org/en/4/developer_guides/customising_the_admin_interface/how_tos/extend_cms_interface/#reactjs-in-silverstripe but I just get a console warning: Uncaught SyntaxError: Unexpected token import

I'm looking for a very simple / basic ReactJS script that I could use as a boilerplate / starting point. Who can help me out? :-)