I am developing a reactjs site and I want to make that site running even when the javascript is disabled in browsers. Is it possible? how to develop a react site that runs on both conditions (Enabled and disabled of Javascript) for ex: fb, StackOverflow are running even javascript is disabled how it happens?
React is a JavaScript framework for the front-end. Which means it executes in the browser. If you disable JavaScript in the browser, React doesn't work anymore. Just in the same way if you delete Photoshop from your computer, you can't open .psd files anymore.
If you really must support browsers without JavaScript (which most people don't), you need to build your app to work with plain old HTML based navigation (think links, forms etc).
It's possible to use React (for people with JS enabled) and a fallback for those without, this approach is called Progressive Enhancement. Might be useful to you: https://softwareengineering.stackexchange.com/questions/25969/should-i-bother-to-develop-for-javascript-disabled
First thing, React is a javascript library so it depends on Javascript. But you can use server side rendering like Next.js
and render the content on server side.
But still user cannot use any react feature in browser.
It's good to render the initial content on screen.
Stackoverflow renders the initial content on server and sends the initial rendered content to the browser.
It's also good for SEO
.
© 2022 - 2024 — McMap. All rights reserved.