{"_id":"@abhisheknairofficial/use-markdown","_rev":"1-eecd2a3fb1e94321a49ffbe500ff1ec3","name":"@abhisheknairofficial/use-markdown","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abhisheknairofficial/use-markdown","version":"1.0.0","description":"A simple React Hook which lets you use MD files in a React application","main":"index.js","scripts":{"test":"test"},"dependencies":{"react-markdown":"^4.3.1"},"peerDependencies":{"react":"^16.8.0"},"repository":{"type":"git","url":"git+https://github.com/abhisheknairofficial/useMarkDown.git"},"keywords":["react","hooks","markdown","react","markdown"],"author":{"name":"abhisheknr4@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/abhisheknairofficial/useMarkDown/issues"},"homepage":"https://github.com/abhisheknairofficial/useMarkDown#readme","gitHead":"3593ace8abbcc2368f692a46b68a5fedbe471f5c","_id":"@abhisheknairofficial/use-markdown@1.0.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-6LU7E2c8/ciK6rNYs3sw4HdqOUgr8nh1jhN7I+NaFt3+KfVo5rSSkJd00hTy9iUmpEUElFidUL4uF86ZL4LTKQ==","shasum":"352d9c76172847bc3f1356d34ea74e698557f229","tarball":"https://registry.npmjs.org/@abhisheknairofficial/use-markdown/-/use-markdown-1.0.0.tgz","fileCount":3,"unpackedSize":2223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6k6yCRA9TVsSAnZWagAAzHIP/jg1V75b1lcWrs/HzIbd\nESC/1B+ZCYDyrEMoOCra3vNCJFHnW1h4EyNSasy4cjYID3LBRB/7xAUyD6vM\nnQvXLy5kkn594SZ97qc7ZxUK5tRbgbH5q3mdK70luRCi7Xds+/cxSAegzpDp\n1DFa+YKVCH8WEyusY/fQg4NSPyNPonbvJz2lvT3meezPa4bqYY8v3lOWFKES\np4w39O/iivYTILat+O435oukKuQwvHuFkA63rNTTqijCpeCRAQ2ynJMmBNcB\nZ2Y5kionoIW+sm68KhSReSvwUHcmJNP36P/OWTwmDo2/sxMoqdt/V256kkCH\nkwlei/w7yyLB1bMqoyl9RKxGHMZTzS7YCylSdA0NXfaJM1egWsC6H8YtD4A1\nnSG2tP0N75vo6QdV4j7MgdtsH/OCjZH1L5jTpEYHC5B75kZM0xb6XhgfkgMt\n16q0y+/W74ClHCZfuuU+xLUyiFqBkh+/lR8l30qdfmOFje0H6HDj8fdOBIDf\nhzUrkD5lm3sOX4WHXAni2mfOaz1nUmXytM2gB7zUaeWnJos+zAi6iUz98x4F\nY2debj7Z7SnwcUGEs67LKsgBtZJGKTGxq1VarVaVY39NJPU5jFj1BOZpPegE\nyw6UdkimWrZr8OmDjyfvxQvqjiYTmKj2uo/r77PeU8jbJWgGa0eeGYz7k6gH\nllHh\r\n=NKA6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPxMhBbEf4IwtkiNzwyaG0nMRxVpouxohphwmyi9UFeQIgJEQXdK+F0WYZbJ7mYcZ4A5Af0H74ABEswiFROXMItIM="}]},"maintainers":[{"name":"abhisheknairofficial","email":"Abhisheknr4@gmail.com"}],"_npmUser":{"name":"abhisheknairofficial","email":"Abhisheknr4@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-markdown_1.0.0_1592413874433_0.8613019492916276"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-17T17:11:14.383Z","1.0.0":"2020-06-17T17:11:14.569Z","modified":"2022-04-04T10:59:24.198Z"},"maintainers":[{"name":"abhisheknairofficial","email":"Abhisheknr4@gmail.com"}],"description":"A simple React Hook which lets you use MD files in a React application","homepage":"https://github.com/abhisheknairofficial/useMarkDown#readme","keywords":["react","hooks","markdown","react","markdown"],"repository":{"type":"git","url":"git+https://github.com/abhisheknairofficial/useMarkDown.git"},"author":{"name":"abhisheknr4@gmail.com"},"bugs":{"url":"https://github.com/abhisheknairofficial/useMarkDown/issues"},"license":"MIT","readme":"# useMarkDown\n\n**useMarkDown** is a simple React Hook that lets you show your MD file contents as a React component.\nThis is built using **React Markdown**, and I have just made a separate one for convenience.\n\n## Installation\n\nInstallation is straight-forward. Use either npm or yarn.\n\n```zsh\nnpm i @abhisheknairofficial/use-markdown\n```\n\nor\n\n```zsh\nyarn add @abhisheknairofficial/use-markdown\n```\n\n## Usage\n\n1. Import into your file as follows:\n\n```js\nimport useMarkDown from '@abhisheknairofficial/use-markdown'\n```\n\n2. Import your MD file similarly\n\n```js\nimport MARKDOWN_FILE from '../foo/bar/index.md'\n```\n\n3. Use it in your component in either of the following ways:\n\n```js\nconst MyReactComponent = (props) => {\n\tconst myMarkdownData = useMarkDown(MARKDOWN_FILE)\n\n\treturn <>{myMarkdownData}</>\n}\n```\n\nor\n\n```js\nconst MyReactComponent = (props) => {\n\treturn <>{useMarkDown(MARKDOWN_FILE)}</>\n}\n```\n","readmeFilename":"README.md"}