The Migration from v4 to v5 guide indicates:
The
Box
system props have an optional alternative API in v5, using thesx
prop. You can read this section for the "why" behind this new API.<Box border="1px dashed grey" p={[2, 3, 4]} m={2}> <Box sx={{ border: "1px dashed grey", p: [2, 3, 4], m: 2 }}>
The referred section indicates:
Having the system under one prop (
sx
) helps to differentiate props defined for the sole purpose of CSS utilities, vs. those for component business logic. It's important for the separation of concerns.
But when it comes to performances, do both ways fall under the benchmark item d. Render 1,000 Box
in Performance tradeoff? Or is there any difference between using system properties and sx
prop?