-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate switch%platform
, browser_only
and platform
#187
Comments
|
can you elaborate please? Edit: oh, i see, that we can use Or in another way. Let's say we add |
We totally agree, but we might not add If we can align both, it would be massive, but I'm afraid that isn't the case. Current browser_only discards functions and We could make |
Worth sharing that there's a package called And causes those kind of questions: https://www.reddit.com/r/nextjs/comments/18ih6nd/useserver_vs_serveronly/ |
to clarify, i don't suggest to remove it but rather rename it so there's no different "concepts" going around (e.g. "browser", "client"). |
There's now a bit confusing situation:
browser_only
extensionswitch%platform
which includeServer
andClient
branchesplatform
which includesjs
andnative
optionsserver-reason-react.browser_ppx
uses-js
to discard stuff for(modes melange)
We could use React namings and semantics to make things easier for folks to understand.
Maybe we could do something like this?
platform
as it's covering the same functionality asbrowser_only
browser_only
to justclient
server
to cover theplatform native
caseswitch%platform
toswitch%environment
So to summarize, we'd have:
switch%environment
withServer
andClient
brancheslet%client
let%server
Wdyt?
Edited by @davesnx added server-reason-react.browser_ppx` example
The text was updated successfully, but these errors were encountered: