Category Archives: React.js

Nesting Component

Parent Component or import React from “react”; import ContactModal from “./contactModal”; Child Component Example:  

Posted in React.js | Leave a comment

Ajax Requests

NPM Terminal: 1. npm install axios –save 2. npm run start

Posted in React.js | Leave a comment

Router

https://reacttraining.com/react-router/web/example/basic Linking Main page Nav File Webpack Hash Link https://www.npmjs.com/package/react-router-hash-link Scroll to top on route change render() { window.scrollTo(0, 0); return ( ) }

Posted in React.js | Leave a comment

Life Cycle Methods

https://facebook.github.io/react/docs/react-component.html Mounting: constructor() componentWillMount() render() componentDidMount() Updating componentWillReceiveProps() shouldComponentUpdate() componentWillUpdate() render() componentDidUpdate() Unmounting componentWillUnmount() Ajax request Set up Listeners Remove Listeners

Posted in React.js | Leave a comment

PropTypes

  OR OR

Posted in React.js | Leave a comment

Props

  OR     OR   Default Props Dynamic Props

Posted in React.js | Leave a comment

Array

Iterating Arrays in JSX .map List Parent and child component .filter List   OR   Delete Array Element

Posted in React.js | Leave a comment