react-notebook
Overview
📓 It's an React-based interactive notebook. mostly inspried by nteract
Scope and goals
- Enable html rendering from ipynb file
- Standalone cross-platform from desktop to web application.
- Store-Dispatch pattern with support multiple UI components.
Usage
Install the package via npm
npm install --save react-notebook
Render Jupyter notebook outputs in a trim little React component.
import Notebook from 'react-notebook'; const notebook = ; const html = <Notebook = />;
or you can attach enchannel and store, dispatch to make it interactable.
import * as enchannelBackend from 'enchannel-notebook-backend';import Notebook createStore from 'react-notebook' // Prompt the user for the baseUrl and wsUrlconst baseUrl = 'http://localhost:8888';const domain = baseUrl;const wsUrl = `ws://`; // Create a connection options objectconst connectionOptions = baseUrl wsUrl; const store dispatch = ; const notebook = ; enchannelBackend;
Development
Python runtime
we need the jupyter-notebook installed:
pip install notebook
Install
Requires node 5.x, npm 3.
- Fork this repo
- Clone it
git clone https://github.com/kerwin/react-notebook
cd
to where youclone
d itnpm install
npm start