Share convert version to React/Nextjs
tienlx97 opened this issue · 6 comments
I wanna share my react/nextjs convert version .What should I do ?
@tienlx97 Hi! Do you used this component? You can create the PR to lit-3 branch I just did, and we can work on this together.
I'm not use this component. I parse it manually.
I'm not use this component. I parse it manually.
I think it should be easy to use the component created specifically for this purpose instead of manual experiments. If you want to go this approach, you can create PR with this component and I can help you to finish.
I use it a website name: Sleeklingo . You can check it
Here is a quick way to set up for react.
import "@khmyznikov/pwa-install";
import { IStorageContext, StorageContext } from "contexts/StorageContext";
import { useContext } from "react";
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace JSX {
interface IntrinsicElements {
"pwa-install": React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
>;
}
}
}
const PwaInstall = (): JSX.Element => {
return <pwa-install id="pwa-install" manifest-url="manifest.json"></pwa-install>;
};
export default PwaInstall;
@hsuanweifu-sports-inference @tienlx97 I have added react polyfill in the latest version: https://glitch.com/edit/#!/mango-shine-diagram?path=src%2Fcomponents%2Fpwa-install.jsx