Open reconbot opened 2 years ago
Hey there! Yeah, I thought about using an enum but I feel setting flags to booleans is more developer friendly than assigning strings to a single property? Maybe it's just me, just a perception — but it might be the case that we have a mode
property as an alternative to the boolean flags? WDYT?
The generated
flag is for SSG, which I'm adding support for in the next cycle.
I think with typescript or js with an editor that understands types it's really easy to autocomplete the strings and typecheck if you make a typo etc.
I think having both is a bad idea for the same reasons having having multiple booleans that represent the same thing is a bad idea. It's possible to represent a bad state even if you typecheck.
I was on the fence if "streaming" is part of "renderingMode" because I'm not sure if "streaming" is relevant for client side rendering or not. (I think it is or could be one day?)
You do make a compelling argument, sir. I'm tempted to make this change for 0.3
onwards.
+1 on this. I came here to say exactly the same. It's also much easier to reason at a glance how a route would be rendered!
Prerequisites
🚀 Feature Proposal
I was reading the rendering options and was wondering if they were exclusive of eachother? And if so maybe they should be a string union or enum?
Motivation
Prevents impossible states from happening.
Example