How to build a Chrome Extension to save web content to Cosmic JS

  • In this tutorial, we’re going to build a Google Chrome extension to save web content to Cosmic JS Buckets.
  • The defining file in a Chrome extension is the manifest.json file.
  • file contains all the functions of the extension.
  • file periodically calls the authorization function and also sends data to the Cosmic bucket.
  • Your Cosmic JS Bucket can thus power your web app, native app, browser extensions or basically anything than can consume an API.

Cosmic JS is a cloud-hosted content platform that offers a flexible and intuitive CMS API. Build websites and applications with more freedom and manage content easier. Get started for Free.
Continue reading “How to build a Chrome Extension to save web content to Cosmic JS”

#Reactjs component that renders children elements when they enter the viewport

  • The option allows you to specify how far below, above, to the left, and to the right of the viewport you want to begin displaying your content.
  • The option allows you to specify how far below the viewport you want to begin displaying your content.
  • The option allows you to specify how far to left of the viewport you want to begin displaying your content.
  • The option allows you to specify how far to the right of the viewport you want to begin displaying your content.
  • By default the throttling function is actually a debounce function so that the checking function is only triggered after a user stops scrolling.

react-lazy-load – React component that renders children elements when they enter the viewport.
Continue reading “#Reactjs component that renders children elements when they enter the viewport”

Become a React Kung Fu master with us — subscribe to our mailing list!

Ugly #Reactjs code? Easy to refactor. Learn how

  • The only difference is that sometimes we want to use input and sometimes textarea .
  • Meaning that instead of hardcoding whether it is input or textarea or div or span (or anything else) we would like to keep it in a variable .
  • For many React developers using JSX it is not clear how to make a dynamic JSX tag .
  • Lowercase JSX tag names are directly compiled as strings.
  • It is required that your variable starts with uppercase instead of lowercase.

For many React developers using JSX it is not clear how to make a dynamic JSX tag. Meaning that instead of hardcoding whether it is input or textarea or div or span (or anything else) we would like to keep it in a variable. Let’s have a look.
Continue reading “Become a React Kung Fu master with us — subscribe to our mailing list!”