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

add forStepClass method to get state more convenient #108

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

bangnokia
Copy link
Contributor

Hi,

This forStepClass is similar to the forStep method to get the state for a specific step, but it uses a component class, which is not the component name. So it could be easy to autocomplete by the IDE, or in case we have many component registries in a package for long names like package:namespace.feature.steps.options-step.

And by the way the name of the Step component registered in the service provider is used nowhere in view, so sometimes it could leak to an error when trying to refactor the class component, tho.

This is an addition, so there is no breaking change

@freekmurze
Copy link
Member

Seems like the tests are failing could you take a look?

Could you also document this?

@bangnokia
Copy link
Contributor Author

yes, let me check and update the pull request, the tests failed to seem weird because I didn't modify anything

@bangnokia
Copy link
Contributor Author

I added the doc for this method and also updated the snapshot for the test

@freekmurze freekmurze merged commit 0f020ed into spatie:main Feb 21, 2024
3 checks passed
@freekmurze
Copy link
Member

Thanks!

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