mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-27 08:08:11 +00:00
moving towards SPA
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import React from 'react'
|
||||
import { hydrateRoot } from 'react-dom/client'
|
||||
import Homebrew from './homebrew/homebrew.jsx'
|
||||
import React from "react";
|
||||
import { hydrateRoot } from "react-dom/client";
|
||||
import Homebrew from "./homebrew/homebrew.jsx";
|
||||
|
||||
// CSS MUST be imported here
|
||||
import './homebrew/homebrew.less' // or wherever your CSS lives
|
||||
import "./homebrew/homebrew.less"; // or wherever your CSS lives
|
||||
|
||||
window.start_app = (props) => {
|
||||
hydrateRoot(
|
||||
document.getElementById('reactRoot'),
|
||||
<Homebrew {...props} />
|
||||
)
|
||||
// Polyfill `global` in the browser
|
||||
if (typeof global === 'undefined') {
|
||||
window.global = window;
|
||||
}
|
||||
|
||||
console.log("entry-client-homebrew");
|
||||
const props = window.__SSR_PROPS__ || {};
|
||||
console.log("props: ", props);
|
||||
hydrateRoot(document.getElementById("reactRoot"), <Homebrew {...props} />);
|
||||
|
||||
Reference in New Issue
Block a user