onNext is called within componentDidMount inside Wizard. This is confusing because no action has been taken at this point and next has not been called yet.
Motivation and Context
onNext being called inside componentDidMount is confusing for developers https://github.com/americanexpress/react-albus/issues/33. Additionally, on initial render, you don't have the steps date or current step id to make a decision about where you might want to go.
How Has This Been Tested?
a unit test was updated to ensure onNext isn't called on render
Types of Changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (adding or updating documentation)
[ ] Dependency update
Checklist:
[ ] My change requires a change to the documentation and I have updated the documentation accordingly.
[x] My changes are in sync with the code style of this project.
[x] There aren't any other open Pull Requests for the same issue/update.
[ ] These changes should be applied to a maintenance branch.
[ ] This change requires cross browser checks.
[ ] This change adds additional environment variable requirements for react-albus users.
[ ] I have added the Apache 2.0 license header to any new files created.
What is the Impact to Developers Using react-albus?
if they previously depended on onNext being called on initial render, it won't get called any more.
BREAKING_CHANGE: onNext will no longer be called within Wizard's componentDidMount
closes https://github.com/americanexpress/react-albus/issues/33
Description
onNext
is called withincomponentDidMount
insideWizard
. This is confusing because no action has been taken at this point andnext
has not been called yet.Motivation and Context
onNext
being called insidecomponentDidMount
is confusing for developers https://github.com/americanexpress/react-albus/issues/33. Additionally, on initial render, you don't have the steps date or current step id to make a decision about where you might want to go.How Has This Been Tested?
a unit test was updated to ensure
onNext
isn't called on renderTypes of Changes
Checklist:
What is the Impact to Developers Using react-albus?
if they previously depended on
onNext
being called on initial render, it won't get called any more.