Are you sure you want to delete this access key?
The files in this directory are React components. We can use these components within Markdown files by adding interactive: true
frontmatter to a Markdown file. Then, using the following syntax to embed the component:
<!--react-->
<ReactComponentHere some='prop' other={`prop`} />
<!--end-react-->
Theoretically React can be embedded anywhere on the site with a little bit of creativity but that is yet to be tested.
Start by adding frontmatter interactive:true
to any Markdown file that you want to support React. This prevents React render time from slowing down any other page and keeping the impact on performance very low.
./react
directory./javascripts/index.js
so the component works with client side rendering./lib/react/engine.js
so the component works with server side renderingThe following example demonstrates the addition of an interactive CodeEditor on one of our pages:
require('component').default
to make sure you get the componentrequire('package').default
import
doesn't always work. Use require
for a more consistent experience with React in this codebase.javascripts/index.js
file as shown herePress p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?