The online racing simulator
Node.js - React Node InSim - React renderer for InSim buttons

🚧 This project is still under development. Any API may change as needed. Bugs and incomplete features are to be expected.

React Node InSim

Introducing React Node InSim, A React renderer for InSim buttons, based on Node.js with TypeScript support. It also provides layout components for easier button positioning, hooks for handling incoming InSim packets and tracking server connections & players.

Installation

npm install react@18 node-insim react-node-insim

or if you use Yarn:

yarn add react@18 node-insim react-node-insim

Basic Usage

To connect to an LFS server from your Node.js application, enter its hostname, a port and a short name for your application into the createRoot function, which will create a React root for you. Then you call root.render() just like you would with React DOM.

Quote from Basic usage: github.com/simbroadcasts/react-node-insim :
import { InSimFlags } from 'node-insim/packets';
import { Button, createRoot } from 'react-node-insim';

const root = createRoot({
name: 'React InSim',
host: '127.0.0.1',
port: 29999,
flags: InSimFlags.ISF_LOCAL,
});

root.render(
<Button top={100} left={80} width={30} height={10}>
Hello InSim!
</Button>,
);


Minimal working example app

A Node.js app written in TypeScript, which displays a single button on local LFS.

https://github.com/mkapal/react-node-insim-example

Components showcase

Button


Stack


Flex


Grid


Toggle button


Toggle button group


Text box


HooksTo learn more, including how to use the InSim button components or InSim hooks, check out the React Node InSim repository on GitHub.

GitHub | NPM | React Node InSim - An open-source project by Sim Broadcasts
#2 - gu3st
Really cool Smile
I have no idea how it work but amazing work
As someone who doesn't know anything about this subject, can you please tell me how I can run the push-button system? I only have node.js installed. I couldn't manage it

FGED GREDG RDFGDR GSFDG