3 ms·
That's true, but I don't feel like it's relevant. React's inline styles API satisfies the principle of least power: you can only pass to it a mapping from stri
by matchu 11y ago
That's true, but I don't feel like it's relevant.
React's inline styles API satisfies the principle of least power: you can only pass to it a mapping from string keys to string/number values.
It's possible that the input data might be compiled from some other more powerful format, and it's possible to argue that this compilation step is a violation of the principle of least power, but that feels like a separate issue. It's very possible to use inline styles without adding unnecessary power to the declaration language - heck, you could declare them in JSON and load them during the build step if you want. How you use inline styles is your decision.