Integrating JavaScript code in MFE

Hello,

I’m working on customizing the registration process in Open edX and have a scenario where some registration fields are conditional based on user input. I would like to use JavaScript to control the visibility of these fields dynamically.

However, the registration page is controlled by the authn MFE, and I want to avoid directly modifying the React code if possible. Instead, I am looking for a way to incorporate vanilla JavaScript to manage which fields are displayed based on user interaction.

  1. Is it possible to integrate JavaScript for controlling field visibility in the MFE without altering the React code itself?
  2. Are there recommended practices or approaches for achieving this kind of functionality in Open edX ?

I would appreciate any guidance or suggestions on how to approach this.