Aurelia: How do we React - Part 2

https://aurelia.io/blog/2019/03/01/how-do-we-react-part-2

4 Likes

We need to remove all the class attributes with the same names as variables.

<modal-dialog>
    <div class="modal-dialog">
      <div class="title">Aurelia</div>
      <div class="content">
        <span>Any HTML you want goes here, including custom components.</span>  
      </div>
    </div>
  </modal-dialog>

If this is an example for React users to see the simplicity in the equivalents, why do we confuse them with class names everywhere with the same names as custom elements and fields?
I’d suggest they all be removed, or at least rename all classes to something like titlestyle to avoid confusion. They look like a convention based automatic styling feature :slight_smile:

1 Like

I just pushed an update without the class attributes.

2 Likes