Open rynti opened 3 months ago
hi @rynti , you can use strict: process.env.NODE_ENV !== 'production'
to enable strict mode by default in a development build.
For example,
create(
{ count: 0 },
(draft) => {
//
},
{
strict: process.env.NODE_ENV !== "production",
}
);
Hey there, I hope this is an okay place to ask this question.
I was wondering if there was any way to by default enable strict mode globally? I'd like to enable strict mode by default in a development build, and turn it off for production, but haven't found an ergonomic way to do that.
In your docs this is also the recommended way:
Would love to hear suggestions for users of this library on how they would go about doing that.
Thanks in advance!