
How to Bootstrap your Instagram Components with React
The first step in making your Instagram component work is to install React, the modern React framework.
React comes with built-in support for a lot of things that you might want to use in your project, including a few things that have been added in React 5.5.
Here’s how to do that.
React components are JavaScript objects that contain a list of methods to call, and they can be used to perform some of the basic actions you might expect to perform with React components.
To learn more about React, I highly recommend reading my book React and Redux.
There are also many great resources on React that are worth checking out.
The React Components API¶ You can read a bit more about the React components API, and see a quick example of how to use them, here.
Let’s go over how to install them in our app.
Create a folder and name it Instagram React, and make sure that the app’s directory is called Instagram React.
Inside this folder, create a file called config.js that looks like this: import React from ‘react’; import { Component } from ‘../../component’; import Instagram from ‘./Instagram’; import App from ‘app’; import ReactDOM from ‘@angular/core’; import ‘./app.component.ts’; import Photos from ‘photos’; import Blog from ‘blog’; import Posts from ‘posts’; import Bootstrap from ‘bootstrap’; import Twilio from ‘twilio’; import img-react from ‘img-react’; /* * Initialize the React component.
*/ ReactDOM.setState({ props: { type: ‘text/html’, src: ‘https://cdnjs.cloudflare.com/ajax/libs/react-img-reactor/2.0.0/react.min.js’, minified: false, }, componentWillMount: function () { this.props.src = img-src; this.state.reactComponent = this; } }); ReactDOM