3

Why TF is it easier to make a modal component with vanilla js compared to react? Like is ReactDOM the only way to add shit dynamically?

Comments
  • 1
    Blending rxjs in makes it a lot easier.
  • 1
    Easier to make and add modal in vanilla js - maybe.

    Maintaining it in larger codebase - no.
  • 2
    @Ubbe the most interesting thing about react is the way is deals with data flow, component reusability and overall maintenance. It's a whole paradigm.

    jQuery is only a big bloated toolbox. They are really not comparable.
  • 2
    @react-guy react is a complicated multitool with an automatoc headchanger.

    jquery is a big clunky toolbox woth rusty jagged edges, that you rummage around in to find what you need while occasionally getting stabbed by old files and dull drill bits.
  • 0
    @SortOfTested I have only used rxjs for data streams and global events so far, and I am trying to insert/delete components dynamically in the reactDOM without any predefined parent container. Can rxjs help me with this?
  • 1
    @phat-lasagna
    Yes, just create a long running subject-based event bus that handles the create/delete discrimination and either uses a global target or supplies a target in the event.
  • 0
    @SortOfTested Ok, I'll try something with this approach for the event handling. I just need to find out how to insert & create the actual React components within the reactDOM dynamically, but thank you for this advice though.
Add Comment