newjersey / njwds

NJ Web Design Standards
https://newjersey.github.io/njwds/
MIT License
9 stars 2 forks source link

Importing accordions in React app - initial setup not working #35

Open namanaman opened 1 year ago

namanaman commented 1 year ago

For UI Claim Status web app, we are using accordions pulled via the njwds NPM package. When we import the JS file uswds-init.js and uswds.js to allow for JS functionality to work, we are noticing that the initial accordion setup is not working (the content of the accordion is shown even though it starts closed by default). There may be something to investigate here into how JS functionality loads and interacts with a React app. After clicking on the accordion button the first time, functionality is as expected