npm install hexo-renderer-jsx react react-dom --save
# or use yarn:
# yarn add hexo-renderer-jsx react react-domThis renderer exposes an useLocals hook for theme authors to access Hexo's locals and avoid prop-drilling.
const { useLocals } = require('hexo-renderer-jsx/use-locals');
export default function Index(props) {
const { config, url_for } = useLocals();
return (
<a href={url_for('')} >
{config.title}
</a>
);
}hexo-renderer-jsx © Baoshuo, Released under the MIT License.
Authored and maintained by Baoshuo with help from contributors.
Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo