nitin42/redocx
nitin42/redocx has 1,430 GitHub stars and 73 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 08:19 UTC. Last push 2020-09-10.
📄 Create word documents with React
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalredocx
Create word documents with React
Introduction
redocx is a library which lets you create word documents with React. It provides a set of components which renders your declarative views and components to word documents.
Example
A simple component that renders a "Hello World" text to a word document.
import React from 'react'
import { render, Document, Text } from 'redocx'
class App extends React.Component {
render() {
return (
<Document>
<Text>Hello World</Text>
</Document>
)
}
}
render(<App />, `${__dirname}/example.docx`)
Let's get started!
Install
Babel presets and cli
npm install --save-dev babel-cli babel-core babel-preset-env babel-preset-react babel-preset-stage-0
react and redocx
npm install --save react redocx
Usage
- Create a
.babelrc
{
"presets": [
"env",
"stage-0",
"react"
]
}
- After configuring babel and assuming you've already created a file
example.jswith this example, runbabel-node example.js. This will render your React component to word document.
Demo
git clone https://github.com/nitin42/redocx.git
cd redocx
npm install
npm run example
Documentation
See the detailed documentation here
Contributing
License
MIT
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,654 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,061 starsreact/react
The library for web and native user interfaces.
252,136 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,563 stars