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

How can I use SDK? #53

Open
YunusEmreAlps opened this issue Apr 15, 2022 · 3 comments
Open

How can I use SDK? #53

YunusEmreAlps opened this issue Apr 15, 2022 · 3 comments

Comments

@YunusEmreAlps
Copy link

YunusEmreAlps commented Apr 15, 2022

Hi,

I hope you're well.

I’m curious about the play with docker project and I'm working on this project right now. I want to add my design and features to this project using React. How can I merge play-with-docker/sdk and my react+next project? I tried to merge these two projects for a week but couldn't.

Can you explain and show me what I need to do for the login process? How can I login with the sdk when the login button is clicked in the frontend?

Just wanted to ask because I'm just starting out. Thank you in advance for your help.

All the best,
Have a good day

Screenshot (382)
Screenshot (383)


This is how I added the package to my project. (yarn add pwd-sdk). I encounter this error when I write as shown in the README.
e3fd24ba-6228-48e4-b4ca-4b0438c952fe
.

@YunusEmreAlps YunusEmreAlps changed the title How to Connect! How can I use SDK? Apr 15, 2022
@marcosnils
Copy link
Contributor

Hi!

here are some instructions on how to use the PWD SKD with react. (https://github.com/play-with-docker/sdk#using-it-with-react)

I'm not a react advanced user, so I won't be able to help you a lot from this point on.

@YunusEmreAlps
Copy link
Author

Thank You!

But I'm really a beginner at React. Can somebody (expert about react) improve introductions about SDK?
I need to use pwd/sdk for my project. But I don't have any progress for now.

@keesj
Copy link

keesj commented Jun 20, 2022

Hi,

My understanding is the following: react (single page apps) want to offer the possibility to perform server side rendering and in such situations the window object is not present. This is why they "make is hard" to access the window object that is generally used in the browser. I have seen the same issue when integrating pwd with angular (https://github.com/keesj/angular-noob-pwd ). Next to working around the issue I think that having a separate callback for the login session would make the code more portable.

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

No branches or pull requests

3 participants