jed_fox1’s avatarjed_fox1’s Twitter Archive — № 96

  1. …in reply to @undefined
    @ajpocus @dan_abramov My understanding is that setting the prototype is necessary so methods of the parent class can be accessed. You have to do Object.create() because otherwise adding methods to the child class will also add them to the parent class. The call in the superclass is needed…
    1. …in reply to @jed_fox1
      @ajpocus @dan_abramov …to set up variables that the superclass’s constructor sets up. I believe the constructor assignment is a convention but not necessary for everything to function. The ES6 class syntax to do the same steps is much simpler:
      oh my god twitter doesn’t include alt text from images in their API