Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using AUI with React.JS

Stefan Ernst [Realigned.io]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 20, 2016

Hello,

I'm trying to use AUI components or at least AUI styling in my React App (generated with create-react-app script) however, neither the CDN CSS get applied nor the aui-react module seems to work.

I get the following npm error when trying to use aui-react installed via npm within the react app:

Module not found: 'classnames' in /....s/node_modules/aui-react/lib

Any ideas? I have seen a few people use AUI in their react components, but I'm not sure how that was done

Many thanks

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Peter Geshev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2016

Hi Stefan,

about the css issues, according to the aui-react project page

Javascript behaviour and styles are provided by AUI. You should include the relevant AUI files based on the AUI documentation.

which means that you will have to import the proper js/css aui resources in the atlassian-plugin.xml

Regards,

Peter

1 vote
Brice Gestas _Elements_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 4, 2017

Hello,

 

You just need to add the classnames dependency into your package.json dependencies section

"dependencies": {
    "aui-react": "0.0.5",
    "classnames": "2.2.3",
     ...
  }
TAGS
AUG Leaders

Atlassian Community Events