Skip to content

Conversation

@Otabekkadirov
Copy link

@Otabekkadirov Otabekkadirov commented Mar 28, 2021

Loyiha mazmuni

React Movie Search app

Talablar:

1. Min:

  • Boshqalarning qilgan ishiga (video yoki maqolalarga) qaramasdan React bilan mustaqil kamida 1 ta app yoki o’yin tayyorlash.
  • React class componentlardanmas, Function componentlar bilan kod yozishi va state o’rniga hook’larni ishlatishi: https://reactjs.org/docs/hooks-intro.html
  • Loyiha kamida 5 ta component’dan iborat bo’lishi.
  • Bootstrap CSS framework ishlatish.
  • Har bir proyekt Github’ga yuklab borilgan bo’lishi va README yozilgan bo'lishi.

2. Max:

Copy link
Contributor

@bahriddin bahriddin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boshlanishiga juda yaxshi. Assoan, componentalarni ajratishda takliflar bor.

otabek/README.md Outdated
@@ -0,0 +1,70 @@
# Getting Started with Create React App
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reactning readmesini o'chirib, loyihangiz haqida yozing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tushunarli.

Comment on lines 24 to 39
<form className="form" onSubmit={searchMovies}>
<label htmlFor="query" className="label">
<h3>Movie Name</h3>
</label>
<input
className="input"
type="text"
name="query"
placeholder="i.e. Harry Potter"
value={query}
onChange={(e) => setQuery(e.target.value)}
></input>
<button className="button" type="submit">
Search
</button>
</form>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shu qismni to'liq component qilib ajrating.

Suggested change
<form className="form" onSubmit={searchMovies}>
<label htmlFor="query" className="label">
<h3>Movie Name</h3>
</label>
<input
className="input"
type="text"
name="query"
placeholder="i.e. Harry Potter"
value={query}
onChange={(e) => setQuery(e.target.value)}
></input>
<button className="button" type="submit">
Search
</button>
</form>
<Form onSubmit={searchMovies} />

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes qilamiz.

Comment on lines 40 to 53
<div className="card-list">
{movies
.filter((movie) => movie.poster_path)
.map((movie) => (
<MovieCard
key={movie.id}
img={movie.poster_path}
title={movie.title}
date={movie.release_date}
rating={movie.vote_average}
desc={movie.overview}
/>
))}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buniyam CardList deb alohida component qilib ajrating.

@@ -0,0 +1,43 @@
import React, { useState } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bu nima?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shunchaki mashq uchun yozilgan edi. 33 gacha sanaydigan counter buttonlar :)

Copy link

@bekji bekji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

@Otabekkadirov Otabekkadirov requested a review from bahriddin March 28, 2021 17:28
Copy link

@bekji bekji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hammasini bilasizku, yana eslatma bo'ldi. PropTypes ishlatsez bo'ldi menimcha. Zo'r yozibsiz lekin!

@@ -0,0 +1,22 @@
import React from "react";

export default function Form(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter olayotganda destructuring ishlatsangiz, qolgan joylarda props. deb yozib o'tirmaysiz.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destructuring qildim

@@ -0,0 +1,23 @@
import React from "react";

export default function MovieCard(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bu yerda ham shu ({ img, title, date, rating, desc }) kabi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import Form from "./Form";
import CardList from "./CardList";

export default function SearchMovies(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bu yerda props kerak emas shekilli

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

props ochirildi.

@Otabekkadirov Otabekkadirov requested a review from bekji April 9, 2021 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants