Image for post
Image for post

…and you really shouldn't use it if you don’t absolutely need to.

Disclaimer: This is not meant to be an anti-jQuery article. All of the points made can be applied to any JavaScript library or framework. jQuery just seems to be the one library developers add before even starting.

Every now and then I come across an article that mentions picking up JavaScript that also mentions learning jQuery right away. I would say this is not the best advice. jQuery should be treated like any other library, and should only be added when it is needed.

There is a lot of argument to not use jQuery at all now. Most of the native DOM API’s that JavaScript offers are supported by all modern browsers (IE9+), and are faster than jQuery. If they are not available in the target browser the workarounds are easy enough to implement without jQuery. …


Making the most out of the children in React components.

What are React Children?

Children (props.children) according to React Documentation is an ‘opaque’ data structure. All that means is don’t mess with them directly. Luckily React offers some utilities to work with Children easier.

The basic structure of a React Child, that is a looks something like this:

Basic React Child Structure

A React Child has a few key properties that you might want to work with:

  • $$typeof: Used by React to verify the child is a valid element.
  • key: This is set by the rendering component. If you are rendering multiple element odds are you are using this. …

About

Doug Miller

Front-End developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store