An extremely simple router for react-blessed
npm install react-blessed-routerThis is a very simple routing package for react-blessed.
``typescript
import React from "react";
import blessed from "neo-blessed";
import { createBlessedRenderer } from "react-blessed";
import ReactBlessedRouter, { Route, Link } from "react-blessed-router";
const App = () => (
Go to Screen 1
Go to Screen 2
);
const screen = blessed.screen({
autoPadding: true,
smartCSR: true,
title: "react-blessed hello world"
});
const render = createBlessedRenderer(blessed);
// Adding a way to quit the program
screen.key(["escape", "q", "C-c"], function(ch, key) {
return process.exit(0);
});
// Rendering the React app using our screen
render(
``