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

Support server side rendering #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bruno12mota
Copy link

Prevents use of window when it is not defined to allow server side rendering

@madrobby
Copy link
Owner

What's the purpose of this? Why would you want to use a library for keyboard shortcuts on the server?

@bruno12mota
Copy link
Author

Not meant to use on the server, but if included on the server it shouldn't throw an error. When working with techs like react where your components also usually need to be rendered on the server side including keymaster dependency shouldn't throw an error. (of course I don't call it unless it's on the client side) at least this is my use case

@Pajn
Copy link

Pajn commented Jul 31, 2016

Please merge this.
If it's still unclear why, I'll try to explain.
React supports applications that can run both on the server and the client with the same codebase. For example the first load might be server-rendered to improve the load time but then the client takes over for real-time updates and similar.
It isn't the keyboard events themselves that must work on the server (which they of course can't) but it must not crash so that the rest of the application can be rendered on the server.

@edwellbrook
Copy link

Would really really love to see this merged!

@mpospelov
Copy link

is there a chance that this PR will be merged?

@ythecombinator
Copy link

Same needing here – using with next.js.

@elv1n
Copy link

elv1n commented Jun 23, 2019

Alternative library on modern js supports SSR https://github.com/elv1n/keybuddy

@vincens2005
Copy link

I've merged this here
As I use this library and it hasn't been touched in two years, and has many prs and issues, I'll be maintaining it in my fork.

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

Successfully merging this pull request may close these issues.

8 participants