Skip to content
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

Rename 'shared load functions' to 'universal load functions' #7952

Closed
Rich-Harris opened this issue Dec 5, 2022 · 6 comments · Fixed by #8027
Closed

Rename 'shared load functions' to 'universal load functions' #7952

Rich-Harris opened this issue Dec 5, 2022 · 6 comments · Fixed by #8027
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@Rich-Harris
Copy link
Member

Describe the problem

I'm working on some tutorial content, and finding the 'server-only load functions' and 'shared load functions' terminology a bit ugly and confusing.

Describe the proposed solution

  • Server load function — +page.server.js, +layout.server.js
  • Universal load function — +page.js, +layout.js

Alternatives considered

'Isomorphic' 🤮

Importance

nice to have

Additional Information

No response

@Rich-Harris Rich-Harris added the documentation Improvements or additions to documentation label Dec 5, 2022
@benmccann
Copy link
Member

Shared always made sense to me. Universal seems a bit weird to me because it's like they can run on anything anywhere, but there's really only two places they're running - the client and the server - so it doesn't seem like it needs such an all encompassing name

@elliott-with-the-longest-name-on-github
Copy link
Contributor

Not to be utterly controversial, but what if we just named them like we do environment variables? Public load and private load. They both follow the same semantics -- public x can be used both server-side and client-side, while private x can only be used server-side.

@dummdidumm dummdidumm added this to the 1.0 milestone Dec 12, 2022
@avarun42
Copy link
Contributor

Isomorphic seems like it has a clear definition that matches the intent of usage here, so why 🤮?

@Rich-Harris
Copy link
Member Author

It's a pretentious word that means the opposite of what people in the JavaScript world want it to mean. Isomorphism describes different things that have the same form, rather than one thing adapting to multiple surfaces. It's backwards.

@Jerboas86
Copy link

Jerboas86 commented Dec 13, 2022

what do you think about omni-side load function or all-side load function?

@lukaszpolowczyk
Copy link
Contributor

lukaszpolowczyk commented Dec 13, 2022

@Jerboas86 In that case, I'll give another suggestion in this style: both-side. :)
Because there are only two sides, so and both-side immediately informs about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants