Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programatically run commands #63

Closed
benmneb opened this issue Aug 26, 2021 · 2 comments
Closed

Programatically run commands #63

benmneb opened this issue Aug 26, 2021 · 2 comments

Comments

@benmneb
Copy link
Contributor

benmneb commented Aug 26, 2021

Is it possible to run commands or just print things to the terminal without actually typing in a command? At the moment the following code runs (console.log works), but just doesnt print anything in the terminal. Seems unusual.

Example:

const welcomeMessage = (
    <span>
        <span style={link} onClick={() => commands.copy()}>
          Click here
        </span>{" "}
        to try to run a function to print to terminal.
      </span>
  );

const commands = {
    copy: () => {
      console.log("success?");
      return <span>Success!</span>;
    }
  };

EDIT ON CODESANDBOX

@bitcoinbrisbane
Copy link
Contributor

Seems realsted to #173

@bony2023
Copy link
Owner

bony2023 commented Nov 9, 2023

feature added in #233

@bony2023 bony2023 closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants