Comments (10)
not working with react dom v: 18
from react-snap.
It will work with react 18 use the following in index.js/main.js :
For me it was the problem with ReactDOM.createRoot
so i replaced it with hydrate and render.
Note : By using this method your app will behave like react 17. In React 18, render was replaced by createRoot. Using render in React 18 will warn that your app will behave as if itβs running React 17. Learn more here..
from react-snap.
Hi guys, Is there any updates for React 18?
from react-snap.
Aww sad to hear, I was about to try it out. Did you ever find a workaround or alternative?
from react-snap.
Encountering the same issue with this. π
from react-snap.
Aww sad to hear, I was about to try it out. Did you ever find a workaround or alternative?
from react-snap.
@Abhishek1350 Thank you . It works but the styles are broken . Do you have any solution for that?
from react-snap.
@Nayem55 Not sure about the broken styles, But you can try these steps.
- Try hosting you app in different platforms like vercel and netlify ( these are free ) and see if the issue is still there.
- If you are using an CDN then try to revalidate it's cache.
- Try this
Ref : https://github.com/stereobooster/react-snap#readme
Also when you deploy your app, check the page content by clicking on "view page source" in the browser. And see if you are getting the expected page content.
Apply these steps one by one and let me know what works!
from react-snap.
Okk .. I'll try this and let you know
from react-snap.
Hello Guys,, do we have any news about any update of this library? is it still compatimple with react 18?
from react-snap.
Hey guys, just had the same problem. Looking at the React 18 API Docu, I solved it like this and it works. Hope it helps.
const rootElement = document.getElementById('root') as HTMLElement
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
const queryClient = new QueryClient()
if (rootElement.hasChildNodes()) {
ReactDOM.hydrateRoot(
rootElement,
<BrowserRouter>
<Auth>
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</React.StrictMode>
</Auth>
</BrowserRouter>
)
} else {
root.render(
<BrowserRouter>
<Auth>
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<App />
</QueryClientProvider>
</React.StrictMode>
</Auth>
</BrowserRouter>
)
}
from react-snap.
Related Issues (20)
- pagerror and incomplet crawled page with firestore HOT 4
- Problem with access to sitemap.xml
- Error in postbuild when using react-snap
- pageerror at /: SyntaxError: Unexpected token '.' HOT 11
- It is not rendering my css file on my 404 page HOT 1
- options.waitFor freezes crawling/rendering
- YouTube Video Embed Causing Error: DOMEXception: A network error occured. HOT 1
- Home page always being returned HOT 7
- Getting Same Page source for every page HOT 3
- Continue on error HOT 1
- Disable Crawling External JS such as Adsense and Analytics
- Support Vite.JS HOT 4
- Who uses it HOT 4
- There is a phenomenon in which the build does not end in the GitHub Actions (Linux Latest) environment. HOT 9
- Not able to deploy on AWS Amplify HOT 3
- react-snap vulnerability
- SyntaxError: Unexpected token '?' HOT 11
- Getting react-app to work
- Prime React UI Kit Not Working With React Snap HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-snap.