Skip to content

Commit

Permalink
Update Playground to use React
Browse files Browse the repository at this point in the history
  • Loading branch information
osyrisrblx committed Sep 12, 2024
1 parent cac1762 commit 7fe6473
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const TS_EDITOR_OPTIONS: editor.IStandaloneEditorConstructionOptions = { ...SHAR

const LUA_EDITOR_OPTIONS: editor.IStandaloneEditorConstructionOptions = { ...SHARED_EDITOR_OPTIONS, readOnly: true };

const EXAMPLES = ["Lava", "t", "Roact"];
const EXAMPLES = ["Lava", "t", "React"];

const CORE_PACKAGES = ["types", "compiler-types"];

Expand Down Expand Up @@ -242,8 +242,8 @@ export default () => {
rootDir: ".",

jsx: monaco.languages.typescript.JsxEmit.React,
jsxFactory: "Roact.createElement",
jsxFragmentFactory: "Roact.Fragment",
jsxFactory: "React.createElement",
jsxFragmentFactory: "React.Fragment",
});

const uri = monaco.Uri.file("input.tsx");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Roact from "@rbxts/roact";
import React from "@rbxts/react";

interface GreetingProps {
name: string;
}

class Greeting extends Roact.Component<GreetingProps> {
public render(): Roact.Element {
class Greeting extends React.Component<GreetingProps> {
public render(): React.Element {
return (
<textbutton
Text={`Hello, ${this.props.name}`}
Expand Down

0 comments on commit 7fe6473

Please sign in to comment.