Open nwbhatia opened 2 years ago
Hi, can someone help me understand if it's possible to do the following two things?
My current implementation is as follows:
const [tags, setTags] = useQueryParams({ 0: withDefault(ArrayParam, []), 1: withDefault(ArrayParam, []), 2: withDefault(ArrayParam, []), 3: withDefault(ArrayParam, []), 4: withDefault(ArrayParam, []), });
Now, given an example, this encodes to:
?0=tagA&1=&2=tagB_tagC&3=&4=
However, say instead I would like to encode this object as:
?zero=tagA&two=tagB_tagC
Thus the two things I'm trying to do are:
without modifying the actual state definition (as I need numerical object keys and the empty lists for other implementation reasons).
Assuming this is possible, would really appreciate any advice or examples! 😃
Hi, can someone help me understand if it's possible to do the following two things?
My current implementation is as follows:
Now, given an example, this encodes to:
However, say instead I would like to encode this object as:
Thus the two things I'm trying to do are:
without modifying the actual state definition (as I need numerical object keys and the empty lists for other implementation reasons).
Assuming this is possible, would really appreciate any advice or examples! 😃