0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Progate React学習

0
Posted at

Reactとは

Reactとは、Javascriptのフレームワークの一つです。WebのUI(見た目や機能)をつくることが出来ます。

Reactの基本的な使い方

`render`というメソッド内にreturnを記述することでプラウザに文字を表示させることが出来ます。
render(){
  return(
    <h1>Hello World</h1>
  );
 }

JSXは、HTMLと同じような記述をすることができます。複数の要素がある場合は、

タグで囲んで、1つの要素にまとめます。
JSXを{/* */}で囲むと、その部分はコメントになります。
render(){
  return(
   <div>
    <h1>h1です</h1>
    <h2>h2です</h2>
    <p>pです</p>
   </div>
  );
 }

{/*この部分はコメントです*/}

imgタグは、HTMLでは、<img src='画像のURL'>のように閉じタグが必要ありませんでしたが、一方、JSXでは閉じタグが必要になります。<img src='画像のURL' />のように、タグの終わりにスラッシュ/を記述します。

render(){
  return(
    <img src="URL"/>
  )
}

App.jsは以下の要素で構成されています。

import React from "react";

class App extends React.Component {
 render(){
  return (
      <h1>Hello React</h1>
    );
 }
}
 export default App;

最後に

洗練さんでインターンの課題(Progate 学習コース PythonⅠ~Ⅲ)です。 [Progate React](https://prog-8.com/languages/react)

最後に
現在ここでインターンしています。
まだまだ駆け出しですが頑張ります!やる気は人一倍です!
洗練

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?