Skip to content

Exquisite Corpse #8

Open
LemonyDesign wants to merge 15 commits into
constructorlabs:masterfrom
LemonyDesign:master
Open

Exquisite Corpse #8
LemonyDesign wants to merge 15 commits into
constructorlabs:masterfrom
LemonyDesign:master

Conversation

@LemonyDesign
Copy link
Copy Markdown

In development…

Comment thread src/components/App.js
}

addFavourites(corpseitem) {
this.setState({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rather than using a callback here, it would be better to use

const favourites = this.state.favourites.concat(corpseitem);
this.setState({
  favourites: favourites
});
window.localStorage.setItem('favourites', favourites);

Comment thread src/components/App.js Outdated
}

removeFromFavourites(corpseitem) {
const filteredFavourites = this.state.favourites.filter(currentFavourite => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice

Comment thread src/components/Favourite.js Outdated

const favouriteclasses = cx('workshop__favourite', {
'active': this.state.active,
'': !this.state.active
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this line is needed as it will insert nothing in both cases

Comment thread src/components/Generate.js Outdated
function Generate({receiveType, typeresult1, typeresult2, favourites, addFavourites, removeFromFavourites}) {

function handleChange1(event) {
receiveType(event.target.value, 'type1');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if type1 and type2 could have more descriptive names as they seem a bit vague

Comment thread src/components/GenerateCorpse.js Outdated

const corpsesclasses = cx('generate__corpses menu--settings', {
'active': notEmpty && sameLength,
'': !(notEmpty && sameLength)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this line needed. It does not add any classes

@dmitrigrabov
Copy link
Copy Markdown
Contributor

Great work

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