Skip to content

Lesson4 Saifutdinova Daria#41

Open
Makaino wants to merge 4 commits into
LeonEsquire:masterfrom
Makaino:saifutdinova_daria
Open

Lesson4 Saifutdinova Daria#41
Makaino wants to merge 4 commits into
LeonEsquire:masterfrom
Makaino:saifutdinova_daria

Conversation

@Makaino

@Makaino Makaino commented Feb 1, 2019

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated
import './styles/style.css'
import WelcomeModal from './components/WelcomeModal';


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не нужно столько пустых строк

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated

class App extends Component {
render() {
const posts = [

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

константу можно вынести из класса

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated
ReactDOM.render (<App/>, document.querySelector('#root'));



Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не нужные пустые строки

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated
return (
<div>
<Blog posts = {posts}/>
<WelcomeModal/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не хватает отступов у строки

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated

return (
<div>
<Blog posts = {posts}/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не хватает отступов у строки

Comment thread Daria_Sayfutdinova/src/app/app.js Outdated
ReactDOM.render (<App/>, document.querySelector('#root'));



Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не нужно столько пустых строк


class Blog extends Component {
render() {
const items = this.props.posts.map((item, index) =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

используйте const { post } = this.props;


class Post extends Component {
render() {
return (<div className='post'>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

разметка поплыла

}

static getDerivedStateFromProps(props, state) {
console.log('2')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

сonsole.log() в коде не должно быть

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Это я пишу для себя. что смотерть что в каком порядке срабатывает.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

при отладке конечно можно использовать, но пушить в ветку когда она готова с console нельзя

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

да, спасибо поняла. по остальным замечаниям тоже все понятно.

if (this.state.modal) {
welcomeModule = <div className='modal'>
<img src="./src/app/components/TMNT.jpg" alt={"tmnt"}/>
<button className='button' onClick={() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

лучше на onClick вешать вызов метода например this.onClose
а в нем уже менять state


componentDidMount() {
this.setState({modal: true})
console.log('4')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

сonsole.log() в коде не должно быть

}



Copy link
Copy Markdown

Choose a reason for hiding this comment

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

не нужно столько пустых строк

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.

2 participants