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

Proposal: have compatible javascript subset #91

Open
empeje opened this issue Jul 23, 2023 · 0 comments
Open

Proposal: have compatible javascript subset #91

empeje opened this issue Jul 23, 2023 · 0 comments

Comments

@empeje
Copy link

empeje commented Jul 23, 2023

Currently we have return command in the top-level of the code for valid component. In my opinion if we have fully-compatible component just like in javascript, it would be better because I can have the same tooling e.g. ESLint.

Before

let greeting = "Have a great day";

return (
  <>
    <div class="container border border-info p-3 text-center min-vw-100">
      <h1>Hologram AI</h1>
      <p>What you are imagining today?</p>
    </div>
  </>
);

After

let greeting = "Have a great day";

const main = () => {
  return (
    <>
      <div class="container border border-info p-3 text-center min-vw-100">
        <h1>Hologram AI</h1>
        <p>What you are imagining today?</p>
      </div>
    </>
  );
}

Related issue: near/near-discovery#269

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

1 participant