Skip to content

Instantly share code, notes, and snippets.

View stubbornella's full-sized avatar
😀
Building a browser

Nicole Sullivan stubbornella

😀
Building a browser
View GitHub Profile
<SimpleTabs defaultActiveKey={1}>
  <Tab eventKey={1} tab="Home">
    ...
  </Tab>
  <Tab eventKey={2} tab="Profile">
    ...
  </Tab>
</SimpleTabs>
@stubbornella
stubbornella / if-you-like-jquery-you-are-gonna-love-react.md
Last active May 26, 2018 06:12
If you like jQuery, you're gonna love React, and how to set it up on npm

I bet you think I'm making that up, right? Here is the thing, they both solve the same problem, just in different ways:

DOM interactions are complicated, it would be great if we didn't have to worry about them.

That's it, that is all both libraries do. I'm exaggerating a little, but not too much! They aren't trying to solve every problem out there, both libraries are highly focused on the DOM. They leave other bells and whistles to adjacent libraries, following a "do one thing and do it well" philosopy.

jQuery solves the DOM complexity problem by giving you handy ways of accessing particular nodes, and little methods for adding events to those nodes once you find them.

$("#price"); // finds the price element