Usage (React/UI)
This page covers how to work with the React UI side of the lua-x-react boilerplate.
Creating a Basic React Component
// web/src/components/HelloWorld.tsx
import React from 'react';
const HelloWorld: React.FC = () => {
return <h2>Hello from your new component!</h2>;
};
export default HelloWorld;// web/src/App.tsx
import React from 'react';
import HelloWorld from './components/HelloWorld';
function App() {
return (
<div>
<h1>Welcome to Lua x React Boilerplate</h1>
<HelloWorld />
</div>
);
}
export default App;Communicating with the Client (Lua) Side
Sending Data to the Client
Receiving Data from the Client
Last updated