mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
docs: add demo for React hooks and context (#150)
This commit is contained in:
@@ -5,8 +5,7 @@ import tpl from './views/demo.liquid';
|
||||
import Parser from 'html-react-parser';
|
||||
import { engine } from './engine';
|
||||
|
||||
class App extends Component {
|
||||
|
||||
export class App extends Component {
|
||||
async componentDidMount() {
|
||||
const html = await engine.renderFile(tpl.toString(), {name: 'alice', logo: logo })
|
||||
this.setState({ html }) // outputs "Alice"
|
||||
@@ -22,5 +21,3 @@ class App extends Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user