Skip to content

New idea, meaningful default prop values#198

Open
balazsorban44 wants to merge 2 commits intoonefinestay:masterfrom
balazsorban44:patch-1
Open

New idea, meaningful default prop values#198
balazsorban44 wants to merge 2 commits intoonefinestay:masterfrom
balazsorban44:patch-1

Conversation

@balazsorban44
Copy link
Contributor

As a solution to #197 I propose the following changes:

defaultState and stateDefinitions now has some meaningful default values.

It only makes sense, because the user does not need to always define some values when using the Component. It can still be changed afterward if needed.

As a solution to onefinestay#197 I propose the following changes:

`defaultState` and `stateDefinitions` now has some meaningful default values.

It only makes sense, because the user does not need to always define some values when using the Component. It can still be changed afterward if needed.
@balazsorban44 balazsorban44 changed the title 💡 New idea, meaningful default prop values New idea, meaningful default prop values Jun 15, 2018
added trailing commas
@AlanFoster
Copy link
Member

I think this would be a backwards breaking change for users of this plugin that don't intentionally don't specify defaultState or stateDefinitions props? 🤔

In your scenario I wonder if a better error message have helped debug the issue faster?

@balazsorban44
Copy link
Contributor Author

Yes, you are right, but I wonder what is a use case when you don't need to set these props: 🤔

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