You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we use a JavaScript object to convert from labelled arguments to a single value, so that the component implementation can receive them from ReactJS:
This leads to larger bundle size as minifiers are not able to remove the string constants in the props object.
There might be a work around that involves passing an array instead of an object. The only constraint is that this array has to be written and read in a consistent order, but because ppx has full knowledge about this, it should be feasible.
The text was updated successfully, but these errors were encountered:
One downside of the suggested improvement is that React Dev Tools won't be showing the props as an object as it does now. Maybe this could be an option that activates or not depending on the "developer" or "release" profile modes 🤔
Right now, we use a JavaScript object to convert from labelled arguments to a single value, so that the component implementation can receive them from ReactJS:
jsoo-react/ppx/ppx.ml
Lines 563 to 569 in d7290d3
However, this approach leads to generated code like:
This leads to larger bundle size as minifiers are not able to remove the string constants in the props object.
There might be a work around that involves passing an array instead of an object. The only constraint is that this array has to be written and read in a consistent order, but because ppx has full knowledge about this, it should be feasible.
The text was updated successfully, but these errors were encountered: