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

Document React support #229

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Document React support #229

merged 2 commits into from
Feb 13, 2025

Conversation

LukeTowers
Copy link
Member

@LukeTowers LukeTowers commented Feb 10, 2025

LukeTowers added a commit to wintercms/winter that referenced this pull request Feb 13, 2025
Documented by wintercms/docs#229.

Additional instructions for adding to a theme:

- Run `artisan create:theme mytheme tailwind` to generate a theme that makes use of Tailwind
- Run `artisan vite:create theme-mytheme --tailwind --react --force` to generate the required files for React
- Run `artisan vite:install` and answer yes to the prompt asking to include mytheme in your package workspace if it asks.
- Add `{{ viteReactRefresh('theme-mytheme') }}` immediately above the `{{ vite() }}` tag in `themes/mytheme/partials/site/footer.htm`
Add the `<div id="root"></div>` element wherever you want your React app to be injected into the DOM (either in `themes/mytheme/layouts/default.htm` or `themes/mytheme/pages/home.htm`).
@LukeTowers LukeTowers merged commit 94aa82c into develop Feb 13, 2025
1 check passed
@LukeTowers LukeTowers deleted the wip/react-support branch February 13, 2025 05:20
bennothommo pushed a commit to wintercms/wn-system-module that referenced this pull request Feb 13, 2025
Documented by wintercms/docs#229.

Additional instructions for adding to a theme:

- Run `artisan create:theme mytheme tailwind` to generate a theme that makes use of Tailwind
- Run `artisan vite:create theme-mytheme --tailwind --react --force` to generate the required files for React
- Run `artisan vite:install` and answer yes to the prompt asking to include mytheme in your package workspace if it asks.
- Add `{{ viteReactRefresh('theme-mytheme') }}` immediately above the `{{ vite() }}` tag in `themes/mytheme/partials/site/footer.htm`
Add the `<div id="root"></div>` element wherever you want your React app to be injected into the DOM (either in `themes/mytheme/layouts/default.htm` or `themes/mytheme/pages/home.htm`).
bennothommo pushed a commit to wintercms/wn-cms-module that referenced this pull request Feb 13, 2025
Documented by wintercms/docs#229.

Additional instructions for adding to a theme:

- Run `artisan create:theme mytheme tailwind` to generate a theme that makes use of Tailwind
- Run `artisan vite:create theme-mytheme --tailwind --react --force` to generate the required files for React
- Run `artisan vite:install` and answer yes to the prompt asking to include mytheme in your package workspace if it asks.
- Add `{{ viteReactRefresh('theme-mytheme') }}` immediately above the `{{ vite() }}` tag in `themes/mytheme/partials/site/footer.htm`
Add the `<div id="root"></div>` element wherever you want your React app to be injected into the DOM (either in `themes/mytheme/layouts/default.htm` or `themes/mytheme/pages/home.htm`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant