twreporter-react-components
What is this
The React components of articles at The Reporter Taiwan.
Published as an npm package.
Why do we this
This is built for twreporter-react and Editorial Tool (you can build the editorial tool using Plate).
These Article React Components will be used on Article Page and Editorial Tool.
How to install this
yarn add @twreporter/react-article-components
How to use this
import Article from '@twreporter/react-article-components'
const Page = ({ record }) => <Article post={record} />
How to develop this
There are two dev modes:
-
We use webpack-dev-server
to render a mock article with all elements for development.
npm run dev-server
-
Or use babel --watch
to complie the source file if there's any change happened
make dev
How to build this
make build