-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Provide instructions on how to use Grommet without its accompanying development stack (grommet-toolbox) #678
Comments
thanks for the suggestion. I will work on that. FYI, you don't need to wrap the entire application inside the Grommet App component. A lot of our components will work without it. The challenge is the base HTML elements like textarea, inputs. etc. These elements will only have style applied if present inside the Grommet App component, which makes sense in my opinion. |
Good point. Perhaps that should be documented too, because it's not immediately clear what the App container does or does not do in terms of affecting other components within it. |
sure thing. let me address that in the docs as well. |
I get the following error when following the documentation at the top and wrapping my current app in the grommet App component. invariant.js:38 Uncaught Invariant Violation: addComponentAsRefTo(...) which I have read is normally caused by duplicate loadings of react on the client side. Can someone assist me in solving this error. I'm very new to react so I imagine it could be something simple. |
i have managed to successfully run grommet as a library with webpack for development and production also register grommet components as web components using reactive elements library where you can use grommet directly inside the html or template engine such as ejs or jade this will improve SEO and make the application easier to maintain, soon i will write full documentation on how to do that |
That sounds cool @digital-flowers. If you can share the project as well it would be awesome. Even better, you could be a guest author in our blog https://blog.grommet.io |
If you are interested to understand what is the minium set of tools required for grommet to work, please check the grommet-standalone project: https://github.com/grommet/grommet-standalone |
The documentation for someone who wants to integrate Grommet into an existing project is currently kind of lacking as evidenced by #632. Perhaps there needs to be more focus in the docs for something simpler, maybe along the lines of:
First, install Grommet from NPM into your project:
npm install --save grommet
Wrap your entire app inside the
<App>
component:Finally, simply import the component you need and use it right away.
Also, maybe it would be a good idea to give the user an option that does not require wrapping the entire app inside the
<App>
component. I always found that to be a little bit weird, because it requires you to completely buy into the Grommet way of doing things. I think a more gradual or softer approach can win over more users.The text was updated successfully, but these errors were encountered: