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

[sui-pde] use structured args in useFeature #1418

Open
alextremp opened this issue May 11, 2022 · 3 comments
Open

[sui-pde] use structured args in useFeature #1418

alextremp opened this issue May 11, 2022 · 3 comments

Comments

@alextremp
Copy link
Collaborator

alextremp commented May 11, 2022

Package

@s-ui/pde@2

after #1410

Description

The hooks signature for useExperiment and useFeature is not coherent as:

  • useExperiment({experimentName, ...}) has structured args so you can pass to it the args you want in each field, p.ex.
useExperiment({experimentName: 'myExperiment'})
useExperiment({experimentName: 'myExperiment', adapterId: 'myAdapter'})
  • useFeature(...) has raw args so you need to pass all args to fill the last one
useFeature('myFeature', null, null, 'myAdapter')

It would be nice to have both hooks signatures with structured args.

@rmoralp
Copy link
Contributor

rmoralp commented May 11, 2022

Agree! It means a major version
[BREAKING CHANGE]

@rmoralp
Copy link
Contributor

rmoralp commented Sep 29, 2022

Request accepted

@rmoralp rmoralp changed the title Request: use structured args in useFeature [sui-pde] use structured args in useFeature Sep 29, 2022
@theonly1me
Copy link

@rmoralp, can you please assign this issue to me?

theonly1me added a commit to theonly1me/sui that referenced this issue Oct 5, 2022
…d arguments instead of raw argu

update useFeature hook so that users can only pass in the required parameters via structured

arguments

ISSUES CLOSED: SUI-Components#1418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants