Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature InputValues #38

Merged
merged 5 commits into from
Sep 16, 2019
Merged

Feature InputValues #38

merged 5 commits into from
Sep 16, 2019

Conversation

klzns
Copy link
Contributor

@klzns klzns commented Sep 16, 2019

@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Sep 16, 2019

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch

  • Minor

  • Major

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Sep 16, 2019

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

}

return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

empty div, is this desired?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will come back to the layout later

[inputValueLabel]: inputValue,
}

return { ...state }
Copy link
Contributor

Choose a reason for hiding this comment

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

I did not understand where did you actually mutate your state here

Copy link
Contributor

Choose a reason for hiding this comment

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

groupState is a ref to a property in the state.

Like: state = {a:{b:{c:1}}}; let b = state.a.b; b = {c:2}; console.log(state); //state={a:{b:{c:2}}}

Can you see how we are mutating the state, after all?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oooh! I see! Makes sense hahahah

Thanks! =D

}

return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this wrapper <div> necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will come back to the layout later and change those divs

type InputValue = TextInputValue | BooleanInputValue | OptionsInputValue

interface TextInputValue {
type: 'TEXT'|string
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need to define type as being 'TEXT' | string, and not just 'TEXT'? Other string values would be ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

iaronaraujo
iaronaraujo previously approved these changes Sep 16, 2019
@klzns klzns merged commit 2fc388d into master Sep 16, 2019
@vtex-io-docs-bot
Copy link

Beep boop 🤖 That's ok, I created an issue for this so we don't forget

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