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

An example of how to use framework with ReactJS #146

Closed
HusakYurii opened this issue Oct 25, 2021 · 4 comments
Closed

An example of how to use framework with ReactJS #146

HusakYurii opened this issue Oct 25, 2021 · 4 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@HusakYurii
Copy link

HusakYurii commented Oct 25, 2021

I was amazed by the framework when I found out about it! However, when I tried to use the framework as npm dependency in my react project I couldn't make it work.
I set up a generic react project by running scripts the ReactJS library provides out of the box and added the PCUI as an npm dependency.. Then I followed the instructions describing how to use the framework components as the react components.
But import Label from 'dist/Label/component'; led to a warning Cannot find module 'dist/Label/component' or its corresponding type declarations.

I would like PCUI to have some doc about how to use the framework with ReactJS or a boilerplate for React + PCUI projects
a dev can start off.
I can assist with writing that doc or boilerplate if you are short of hands
😉

@willeastcott willeastcott added question Further information is requested help wanted Extra attention is needed labels Oct 26, 2021
@ellthompson
Copy link
Contributor

Hi @HusakYurii

There is a guide in our docs for React + PCUI: https://playcanvas.github.io/pcui/react/
And you can see a more extensive example here: https://playcanvas.github.io/pcui/examples/todo/

It'd be great if you could offer any other suggestions on how we may need to expand the React documentation.

@HusakYurii
Copy link
Author

Hey @ellthompson !
Thanks for getting back to my question.
I tried to use the PCUI as the examples in the doc show, but the import statements showed errors. I already forgot how I tried to use it, but I tried multiple ways 🤔
Has the documentation been updated since 25 Oct 2021

@willeastcott
Copy link
Contributor

willeastcott commented Dec 23, 2022

Hi @HusakYurii. This issue has gone a little bit stale. PCUI has updated significantly in the last couple of weeks and just hit v3.0.0. I would suggest trying again. If there are still problems, we will investigate.

@willeastcott
Copy link
Contributor

Closing as I suspect this is no longer an issue. But feel free to reopen if you are continuing to experience problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants