@rbxts/react
Advanced tools
+12
-16
| { | ||
| "name": "@rbxts/react", | ||
| "version": "17.2.3", | ||
| "version": "17.3.0-alpha.1", | ||
| "description": "React bindings for Roblox", | ||
| "keywords": [ | ||
| "roblox", | ||
| "typescript", | ||
| "roblox-ts" | ||
| "main": "src/init.lua", | ||
| "types": "src/index.d.ts", | ||
| "files": [ | ||
| "src", | ||
| "default.project.json" | ||
| ], | ||
@@ -14,3 +15,3 @@ "author": "littensy", | ||
| "type": "git", | ||
| "url": "https://github.com/littensy/rbxts-react" | ||
| "url": "git+https://github.com/littensy/rbxts-react.git" | ||
| }, | ||
@@ -20,16 +21,11 @@ "bugs": { | ||
| }, | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "main": "src/init.lua", | ||
| "types": "src/index.d.ts", | ||
| "files": [ | ||
| "src", | ||
| "default.project.json", | ||
| "README.md" | ||
| "keywords": [ | ||
| "roblox", | ||
| "typescript", | ||
| "roblox-ts" | ||
| ], | ||
| "dependencies": { | ||
| "@rbxts/react-vendor": "17.2.3" | ||
| "@rbxts-js/react": "^17.1.20-ts.1" | ||
| }, | ||
| "scripts": {} | ||
| } |
+16
-6
| <p align="center"> | ||
| <p align="center"> | ||
| <img width="150" height="150" src="https://github.com/littensy/rbxts-react/blob/main/images/logo.png?raw=true" alt="Logo"> | ||
| <img width="150" height="150" src="https://github.com/littensy/rbxts-react/blob/main/assets/logo.png?raw=true" alt="Logo"> | ||
| </p> | ||
@@ -20,6 +20,2 @@ <h1 align="center"><b>@rbxts/react</b></h1> | ||
| > [!IMPORTANT] | ||
| > This package requires roblox-ts version 3.0 or later. | ||
| > If you're using an older version of roblox-ts, you'll need to update to the latest version. | ||
| ## 📦 Setup | ||
@@ -37,2 +33,16 @@ | ||
| Then, add the following to your Rojo project file, under the `node_modules` folder: | ||
| ```json | ||
| "node_modules": { | ||
| "$className": "Folder", | ||
| "@rbxts": { | ||
| "$path": "node_modules/@rbxts" | ||
| }, | ||
| "@rbxts-js": { | ||
| "$path": "node_modules/@rbxts-js" | ||
| } | ||
| } | ||
| ``` | ||
| ### Configuration | ||
@@ -54,3 +64,3 @@ | ||
| ```ini | ||
| node-linker=hoisted | ||
| public-hoist-pattern[]=*@rbxts* | ||
| ``` | ||
@@ -57,0 +67,0 @@ |
+21
-21
@@ -1,4 +0,2 @@ | ||
| local script: any = script | ||
| local React = require(script.Parent:WaitForChild("ReactLua").React) | ||
| local React: { [string]: any } = require(script.Parent.Parent:WaitForChild("@rbxts-js").React) | ||
| local tags = require(script.tags) | ||
@@ -10,3 +8,3 @@ | ||
| function exports.ReactComponent(class) | ||
| function exports.ReactComponent(class: any) | ||
| local componentClass = exports.Component:extend(tostring(class)) | ||
@@ -32,3 +30,3 @@ setmetatable(class, nil) | ||
| function exports.ReactPureComponent(class) | ||
| function exports.ReactPureComponent(class: any) | ||
| local componentClass = exports.PureComponent:extend(tostring(class)) | ||
@@ -52,23 +50,25 @@ setmetatable(class, nil) | ||
| function exports.createElement(component, props, ...) | ||
| component = tags[component] or component | ||
| function exports.createElement(component: string | (any) -> any, props: { [string]: any }, ...: any) | ||
| if type(component) == "string" then | ||
| component = tags[component] or component | ||
| if props and type(component) == "string" then | ||
| if props.Change then | ||
| for key, value in props.Change do | ||
| props[React.Change[key]] = value | ||
| if props then | ||
| if props.Change then | ||
| for key, value in props.Change do | ||
| props[React.Change[key]] = value | ||
| end | ||
| props.Change = nil | ||
| end | ||
| props.Change = nil | ||
| end | ||
| if props.Event then | ||
| for key, value in props.Event do | ||
| props[React.Event[key]] = value | ||
| if props.Event then | ||
| for key, value in props.Event do | ||
| props[React.Event[key]] = value | ||
| end | ||
| props.Event = nil | ||
| end | ||
| props.Event = nil | ||
| end | ||
| if props.Tag then | ||
| props[React.Tag] = props.Tag | ||
| props.Tag = nil | ||
| if props.Tag then | ||
| props[React.Tag] = props.Tag | ||
| props.Tag = nil | ||
| end | ||
| end | ||
@@ -75,0 +75,0 @@ end |
+15
-5
@@ -17,4 +17,6 @@ local classNames = { | ||
| "Animator", | ||
| "Annotation", | ||
| "ArcHandles", | ||
| "Atmosphere", | ||
| "AtmosphereSensor", | ||
| "Attachment", | ||
@@ -31,2 +33,3 @@ "AudioAnalyzer", | ||
| "AudioFader", | ||
| "AudioFilter", | ||
| "AudioFlanger", | ||
@@ -72,2 +75,3 @@ "AudioListener", | ||
| "ColorCorrectionEffect", | ||
| "ColorGradingEffect", | ||
| "CompressorSoundEffect", | ||
@@ -101,2 +105,3 @@ "ConeHandleAdornment", | ||
| "ExperienceInviteOptions", | ||
| "ExplorerFilterInstance", | ||
| "Explosion", | ||
@@ -109,2 +114,3 @@ "FaceControls", | ||
| "FloorWire", | ||
| "FluidForceSensor", | ||
| "Folder", | ||
@@ -117,2 +123,3 @@ "ForceField", | ||
| "Handles", | ||
| "HapticEffect", | ||
| "Hat", | ||
@@ -154,2 +161,3 @@ "HiddenSurfaceRemovalAsset", | ||
| "NoCollisionConstraint", | ||
| "Noise", | ||
| "NumberPose", | ||
@@ -180,2 +188,3 @@ "NumberValue", | ||
| "RobloxEditableImage", | ||
| "RobloxEditableMesh", | ||
| "RocketPropulsion", | ||
@@ -188,2 +197,3 @@ "RodConstraint", | ||
| "RotationCurve", | ||
| "RTAnimationTracker", | ||
| "ScreenGui", | ||
@@ -261,7 +271,2 @@ "Script", | ||
| "UnreliableRemoteEvent", | ||
| "UserNotification", | ||
| "UserNotificationPayload", | ||
| "UserNotificationPayloadAnalyticsData", | ||
| "UserNotificationPayloadJoinExperience", | ||
| "UserNotificationPayloadParameterValue", | ||
| "Vector3Curve", | ||
@@ -273,4 +278,7 @@ "Vector3Value", | ||
| "VelocityMotor", | ||
| "VideoDeviceInput", | ||
| "VideoFrame", | ||
| "ViewportFrame", | ||
| "VisualizationMode", | ||
| "VisualizationModeCategory", | ||
| "WedgePart", | ||
@@ -281,3 +289,5 @@ "Weld", | ||
| "WireframeHandleAdornment", | ||
| "WorkspaceAnnotation", | ||
| "WorldModel", | ||
| "WrapDeformer", | ||
| "WrapLayer", | ||
@@ -284,0 +294,0 @@ "WrapTarget", |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
249
4.18%92781
-8.61%2033
-5.62%2
100%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed