server-reason-react icon indicating copy to clipboard operation
server-reason-react copied to clipboard

Could we compose switch%platform with other variables?

Open pedrobslisboa opened this issue 6 months ago • 0 comments

Could we have a composable switch%platform with other variables?

Instead of having:

switch%platform (Runtime.platform) {
  | Client =>
    switch (foo) {
    | (true) =>  // ...
    | (false) =>  // ...
    }
  | Server =>  // ...
}
switch%platform (Runtime.platform, foo) {
  | (Client, _) =>  // ...
  | (Server, false) =>  // ...
  // ...
}

Does it make sense?

pedrobslisboa avatar Aug 15 '24 15:08 pedrobslisboa