vscode-reasonml icon indicating copy to clipboard operation
vscode-reasonml copied to clipboard

It does not recognize the right attribute

Open ghost opened this issue 7 years ago • 1 comments

Hi all
On the following component:

let component = ReasonReact.statelessComponent("NavItemView");

let make = (~text: string, ~href: string, ~icon: string, _children) => {
  ...component,
  render: (_self) => {
    <li className="nav-item">
      <a className="nav-link" href={href}>
        <i className=("fa fa-fw " ++ icon)></i>
        <span className="nav-link-text">{ReasonReact.string(text)}</span>
      </a>
    </li>
  }
};

Use it like: screenshot from 2018-05-05 12-27-49 As you can recognize, the compiler complains. But I am using component correctly.

Thanks

ghost avatar May 05 '18 10:05 ghost

@bifunctor Merlin only "sees" changes in modules signatures after a compilation takes place. In your case, it seems that you changed the signature of the make function in NavItemView to add a new prop icon? In that case, you'd need to rebuild first by calling bsb -make-world (or adding bsb to reason.diagnostics.tools and saving), so Merlin can get the latest signatures.

Please let us know if the issue is solved after rebuilding.

jchavarri avatar May 05 '18 11:05 jchavarri