Last active
April 11, 2024 02:51
-
-
Save tgalopin/f980149f95714293adee05cf11a85202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assets/controllers/app_controller.jsx | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Controller } from 'stimulus'; | |
import App from '../components/App.jsx'; | |
export default class extends Controller { | |
connect() { | |
render(<App />, this.element); | |
} | |
} | |
// In your Twig file: | |
// <div data-controller="app"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment