sui icon indicating copy to clipboard operation
sui copied to clipboard

[sui-pde] use structured args in useFeature

Open alextremp opened this issue 3 years ago • 3 comments

Package

@s-ui/pde@2

after https://github.com/SUI-Components/sui/pull/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.

alextremp avatar May 11 '22 13:05 alextremp

Agree! It means a major version [BREAKING CHANGE]

rmoralp avatar May 11 '22 13:05 rmoralp

Request accepted

rmoralp avatar Sep 29 '22 12:09 rmoralp

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

theonly1me avatar Oct 02 '22 07:10 theonly1me