{"id":20804440,"url":"https://github.com/sequencemedia/react-redux-render","last_synced_at":"2025-05-07T03:43:20.301Z","repository":{"id":34918176,"uuid":"189085393","full_name":"sequencemedia/react-redux-render","owner":"sequencemedia","description":"Render isomorphic React + Redux apps and components in Node","archived":false,"fork":false,"pushed_at":"2025-05-06T21:29:34.000Z","size":3940,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-07T03:43:10.471Z","etag":null,"topics":["isomorphic","react","redux","render"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sequencemedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-28T18:51:40.000Z","updated_at":"2025-05-06T21:29:36.000Z","dependencies_parsed_at":"2023-09-24T22:18:01.444Z","dependency_job_id":"6ac90e4c-ad5d-4ae3-b719-fd33d62bb451","html_url":"https://github.com/sequencemedia/react-redux-render","commit_stats":{"total_commits":911,"total_committers":4,"mean_commits":227.75,"dds":0.007683863885839748,"last_synced_commit":"e0f73c93009d5220842989180f49c12f1f2266e8"},"previous_names":[],"tags_count":345,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Freact-redux-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Freact-redux-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Freact-redux-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Freact-redux-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sequencemedia","download_url":"https://codeload.github.com/sequencemedia/react-redux-render/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810272,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["isomorphic","react","redux","render"],"created_at":"2024-11-17T19:09:22.623Z","updated_at":"2025-05-07T03:43:20.291Z","avatar_url":"https://github.com/sequencemedia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-redux-render\n\nRender isomorphic _React_ apps and components in Node.\n\n- With _Redux_\n\nAn example implementation of the companion package `@sequencemedia/react-router-redux-render` can be found in [react-router-pagination-io](http://github.com/sequencemedia/react-router-pagination-io.git).\n\n## Example\n\nIn Express:\n\n```javascript\nconst express = require('express')\n\nconst app = express()\nconst port = 3000\n\nconst {\n  configureStore\n} = require('./path/to/store')\n\nconst store = configureStore()\n\nconst {\n  renderToString\n} = require('react-redux-render')\n\nconst App = require('./path/to/react/app')\n\napp.get('/', (req, res) =\u003e res.send(renderToString(store, App)))\n\napp.listen(port, () =\u003e console.log(`Express ${port}`))\n```\n\nIf `renderToString` encounters an error then it throws a `500 Internal Server Error`. Otherwise, it returns a string.\n\nYou can supply `App` with `props` using the third argument:\n\n```javascript\nrenderToString(store, App, {})\n```\n\n(Since this is a _Redux_ app you are unlikely to use `props`.)\n\n## In this package\n\n`react-redux-render` exports three functions:\n\n1. `renderToString`\n2. `renderToStaticMarkup`\n3. `render`\n\n`renderToString` generates `\u003chtml /\u003e` including the attributes that _React_ uses in `ReactDOM.hydrate()`. It implements [`ReactDOMServer.renderToString()`](https://react.dev/reference/react-dom/server/renderToString).\n\n`renderToStaticMarkup` doesn't include those attributes. It's useful for using React as a rendering engine for static pages. It implements [`ReactDOMServer.renderToStaticMarkup()`](https://react.dev/reference/react-dom/server/renderToStaticMarkup).\n\n`render` executes `renderToString` but returns a `Promise` which resolves to a string.\n\n## Companion packages\n\n1. `@sequencemedia/react-router-redux-render` for React Router apps (with Redux)\n2. `@sequencemedia/react-router-render` for React Router apps (without Redux)\n3. `@sequencemedia/react-render` for React Redux apps (without React Router or Redux)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencemedia%2Freact-redux-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsequencemedia%2Freact-redux-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencemedia%2Freact-redux-render/lists"}