Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Rendora | 1,950 | a month ago | 1 | January 04, 2019 | 28 | apache-2.0 | Go | |||
dynamic server-side rendering using headless Chrome to effortlessly solve the SEO problem for modern javascript websites | ||||||||||
React Snapshot | 1,619 | 185 | 16 | 2 years ago | 11 | November 02, 2017 | 71 | mit | JavaScript | |
A zero-configuration static pre-renderer for React apps | ||||||||||
React Scanner | 474 | 4 | a month ago | 20 | September 25, 2022 | 14 | mit | JavaScript | ||
Extract React components and props usage from code. | ||||||||||
React Rpg.com | 242 | 3 years ago | 26 | mit | JavaScript | |||||
Turn-based, Dungeon-crawling, RPG made with React + Redux. Play it now on https://react-rpg.com | ||||||||||
Javpy | 151 | 2 years ago | 47 | July 18, 2020 | 16 | apache-2.0 | JavaScript | |||
Enjoy driving on a Javascriptive (originally Pythonic) way to Japanese AV! | ||||||||||
Sentinel Crawler | 121 | 2 months ago | n,ull | mit | JavaScript | |||||
Xenomorph Crawler, a Concise, Declarative and Observable Distributed Crawler(Node / Go / Java / Rust) For Web, RDB, OS, also can act as a Monitor(with Prometheus) or ETL for Infrastructure :dizzy: 多语言执行器,分布式爬虫 | ||||||||||
Eyes | 110 | 8 months ago | mit | Python | ||||||
Public Opinion Mining System of Taiwanese Forums | ||||||||||
Estela | 110 | 3 days ago | 9 | mit | TypeScript | |||||
estela, an elastic web scraping cluster 🕸 | ||||||||||
Unfx Proxy Parser | 41 | 10 months ago | n,ull | mit | JavaScript | |||||
Unfx Proxy Parser - Nextgen proxy parser with deep links crawler. Follow to internal links, third-party links. Sorting results by countries. | ||||||||||
Webmagician Ui | 26 | 3 years ago | mit | TypeScript | ||||||
An admin UI project for a configurable web crawler platform |
⚠️⚠️⚠️ DEPRECATED: USE stereobooster/react-snap INSTEAD ⚠️⚠️
A zero-configuration static pre-renderer for React apps. Starting by targeting Create React App (because it's great)
Server-side rendering is a big feature of React, but for most apps it can be more trouble than its worth. Personally, I think the sweet spot is taking static site snapshots of all your publicly-accessible pages & leaving anything requiring authentication as a normal, JS-driven Single Page App.
This is a project to do that. Automatically, without any configuration, just smart defaults. Retrospective progressive enhancement.
The snapshots still have the normal JS bundle included, so once that downloads the site will function exactly as before (i.e. instantaneous page transitions), but you serve real, functional HTML & CSS as soon as possible. It's good for SEO (yes Google crawls SPAs now but they still reward perf and this perfs like a banshee), it's good if your JS is broken or something render-blocking has a network fail, it's good for accessibility, it's good for Slackbot or Facebook to read your opengraph tags, it's just good.
npm i -D react-snapshot
"scripts"
from- "build": "react-scripts build"
+ "build": "react-scripts build && react-snapshot"
react-dom
:- import ReactDOM from 'react-dom';
+ import { render } from 'react-snapshot';
- ReactDOM.render(
+ render(
<App/>,
document.getElementById('root')
);
This calls ReactDOM.render
in development and ReactDOMServer.renderToString
when prerendering. If I can make this invisible I will but I can't think how at the moment.
You can specify additional paths as entry points for crawling that would otherwise not be found. It's also possible to exclude particular paths from crawling. Simply add a section called "reactSnapshot"
to your package.json.
"reactSnapshot": {
"include": [
"/other-path",
"/another/nested-path"
],
"exclude": [
"/signup",
"/other-path/exclude-me/**"
],
"snapshotDelay": 300
}
Note that exclude can be passed a glob, but include cannot.
The default snapshot delay is 50ms, and this can be changed to suit your app's requirements.
Check out create-react-app-snapshot.surge.sh for a live version or geelen/create-react-app-snapshot for how it was built, starting from create-react-app's awesome baseline. No ejecting necessary, either.
The diff from the original create-react-app code might be enlightening to you as well.
It's pretty simple in principle:
There's a few more steps to it, but not much.
React-snapshot will crawl all links that it finds. You can create "site map" page, which will contain links to all pages.
build/index.html
to build/200.html
at the beginning, because it's a nice convention. Hosts like surge.sh understand this, serving 200.html
if no snapshot exists for a URL. If you use a different host I'm sure you can make it do the same.pushstate-server
is used to serve the build
directory & serving 200.html
by defaultThis is a hacky experiment at the moment. I would really like to see how far we can take this approach so things "just work" without ever adding config. Off the top of my head:
pushstate-server
serves 200.html
even if a HTML snapshot is present. So once you've run react-snapshot
, you have to switch to http-server
or superstatic
to test if it worked. Or you could just push to surge.sh each time, which isn't too bad./
and crawling sufficient? Might there be unreachable sections of your site?robots.txt
file?200.html
pushstate fallback? What if you want to remove the bundle (effectively making this a static site generator)?build
directory to something like snapshot
or dist
instead of modifying it in-place?This should work for simple cases. For less simple cases, go with:
MIT