Day 52

in #code7 years ago

March 6th, 2018

Hello! At the React course by Wes Bos I learned some more about components.
Render() determines what HTML elements we render out to the page. First we need to import react, as well as the render method, which is used to mount the app on a HTML file.

       import React from 'react';

       import{ render } from 'react-dom';

            class StorePicker extends React.Component {
               render() {
                return <p>Hello!</p>
             }
            }

We can mount the react app in an empty div in the HTML file.
The render() method takes two arguments.
• JSX like html
• and mounting point

            render(<StorePicker/>, document.querySelector('#main'));

You always need to import react in your components.

At the Web Development Bootcamp I worked some more on Movie API
&apikey=thewdb should be added to the omdbapi
To parse an object

    var results = JSON.parse(body);

Cheers!

Coin Marketplace

STEEM 0.25
TRX 0.19
JST 0.036
BTC 93397.76
ETH 3352.57
USDT 1.00
SBD 3.86