Closed bertho-zero closed 6 years ago
@bertho-zero How can I reproduce this?
Also please post the code or similar code that you were using. I need to see how you were invoking classwrap
and what arguments you passed to it.
I had to use something like:
// kind === 'success' in my case
<button
className={cw([ 'btn', 'btn-block', {
[ `btn-${kind}` ]: !!kind
}])}
>
...
</button>
On server I have btn btn-success btn-block
and on client I have btn btn-block btn-success
, or the other way round, I no longer have the example at hand.
@bertho-zero I tested the result on the server and on the client on CodePen and got the same result in both instances. This is my code.
console.log(
cw([
"btn",
"btn-block",
{
[`btn-${kind}`]: !!kind
}
])
) // => btn btn-block btn-success
Can you still reproduce the issue? And what Node.js version are / were you using on the server?
No I did not succeed in reproducing it, certainly a change that was made only on one side.
@bertho-zero Thanks! FWIW I added a test for this and published 1.2.3 🎉
The order of my classes is different server side and client side, so I am forced to use classnames in the meantime.