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

Update index.md #9644

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/src/pages/addons/writing-addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ addons.register(ADDON_ID, api => {
});
});
```
#### Note:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aaron-Pool is this required, or is this an issue of mis-configuration in @avihaym's project? I'm a little suspicious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on the JSX preset/settings being used by whatever is compiling this. Theoretically h should be auto-injected.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aaron-Pool this is an addon, so these files should be treated as react, not Vue AFAIK

Possibly related? #9648
cc @ndelangen

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this i`m getting "Uncaught ReferenceError: h is not defined"

Copy link
Member

@shilman shilman Jan 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avihaym I understand that this fixes the warning for you. That doesn't necessarily make it the correct fix. Adding it to the documentation makes it sound like it's the recommended workaround, but I suspect it's more likely that your project is misconfigured. Thanks for your patience while we work this out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So after playing with this hack its not really working...
I mange to add myAddon tab to panel but the div inside not showing.
I create a new react app and its working with the same code in register.js.

So maybe just add to the docs that is not supprt Vue yet...
Thanks for your patience.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's close this PR.

I hope you can assist us with testing #9648 @avihaym

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when you finish... i will try to help you :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome guys 🚀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll ping you when the PR is in an alpha release.

Might take a week, since @shilman is currently performing very important research in the field. 🏖

Vue users need to pass h variable to render function:
```js
const render = (h) => ({ active, key }) => (
<AddonPanel active={active} key={key}>
<MyPanel />
</AddonPanel>
);
```



### register the addon

Expand Down