Title: Getting error reactNodeRef must hold a reference to a ReactNode. unclear why · Issue #142 · microsoft/angular-react · GitHub
Open Graph Title: Getting error reactNodeRef must hold a reference to a ReactNode. unclear why · Issue #142 · microsoft/angular-react
X Title: Getting error reactNodeRef must hold a reference to a ReactNode. unclear why · Issue #142 · microsoft/angular-react
Description: I'm trying to wrap a slate editor by following the fabric examples. I can't seem to get a basic example working. I've set up a module like: import { registerElement } from '@angular-react/core' import { CommonModule } from '@angular/comm...
Open Graph Description: I'm trying to wrap a slate editor by following the fabric examples. I can't seem to get a basic example working. I've set up a module like: import { registerElement } from '@angular-react/core' imp...
X Description: I'm trying to wrap a slate editor by following the fabric examples. I can't seem to get a basic example working. I've set up a module like: import { registerElement } from '@angular...
Opengraph URL: https://github.com/microsoft/angular-react/issues/142
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Getting error reactNodeRef must hold a reference to a ReactNode. unclear why","articleBody":"I'm trying to wrap a slate editor by following the fabric examples. I can't seem to get a basic example working. I've set up a module like:\r\n\r\n\r\n```\r\nimport { registerElement } from '@angular-react/core'\r\nimport { CommonModule } from '@angular/common'\r\nimport { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'\r\nimport { Editor } from 'slate-react'\r\nimport { SlateEditorComponent } from './slate-editor/slate-editor.component'\r\n\r\n@NgModule({\r\n declarations: [SlateEditorComponent],\r\n imports: [CommonModule],\r\n exports: [SlateEditorComponent],\r\n schemas: [NO_ERRORS_SCHEMA],\r\n})\r\nexport class SlateModule {\r\n constructor() {\r\n registerElement('Editor', () => Editor)\r\n }\r\n}\r\n```\r\n\r\nand a simple component:\r\n\r\n```\r\nimport { Value } from 'slate'\r\nimport { EditorProps } from 'slate-react'\r\n\r\n@Component({\r\n selector: 'app-slate-editor',\r\n template: `\r\n \u003cEditor #reactNode [value]=\"value\" [Change]=\"onChange\">\u003c/Editor>\r\n `,\r\n styles: ['react-renderer'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SlateEditorComponent extends ReactWrapperComponent\u003cEditorProps> {\r\n @ViewChild('reactNode', { static: true }) protected reactNodeRef: ElementRef\r\n\r\n @Input() value: EditorProps['value'] = Value.fromJSON({\r\n document: {\r\n nodes: [\r\n {\r\n object: 'block',\r\n type: 'paragraph',\r\n nodes: [\r\n {\r\n object: 'text',\r\n text: 'A line of text in a paragraph.',\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n })\r\n\r\n @Input() onChange: EditorProps['onChange'] = ({ value }) => console.log(value)\r\n\r\n constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, renderer: Renderer2) {\r\n super(elementRef, changeDetectorRef, renderer)\r\n }\r\n}\r\n```\r\n\r\n\r\nI've installed the following dependencies:\r\n\r\n```\r\n \"dependencies\": {\r\n \"@angular-react/core\": \"^1.0.1\",\r\n \"@angular/animations\": \"~8.0.3\",\r\n \"@angular/cdk\": \"^8.0.1\",\r\n \"@angular/common\": \"~8.0.3\",\r\n \"@angular/compiler\": \"~8.0.3\",\r\n \"@angular/core\": \"~8.0.3\",\r\n \"@angular/forms\": \"~8.0.3\",\r\n \"@angular/material-moment-adapter\": \"^8.0.1\",\r\n \"@angular/platform-browser\": \"~8.0.3\",\r\n \"@angular/platform-browser-dynamic\": \"~8.0.3\",\r\n \"@angular/router\": \"~8.0.3\",\r\n \"@types/slate-react\": \"^0.22.6\",\r\n \"@types/stylenames\": \"^1.1.0\",\r\n \"immutable\": \"^4.0.0-rc.12\",\r\n \"react\": \"^16.11.0\",\r\n \"react-dom\": \"^16.11.0\",\r\n \"rxjs\": \"~6.5.2\",\r\n \"slate\": \"^0.47.8\",\r\n \"slate-react\": \"^0.22.9\",\r\n \"tslib\": \"^1.9.0\",\r\n \"zone.js\": \"~0.9.1\"\r\n },\r\n```\r\n\r\nI'm at a bit of a loss and would appreciate any guidance on what I'm doing wrong here.","author":{"url":"https://github.com/bryandbs","@type":"Person","name":"bryandbs"},"datePublished":"2019-10-31T19:34:14Z","url":"https://github.com/microsoft/angular-react/issues/142"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c86fde7d-2a76-5655-3d65-72fe6593e04d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A96:4BB79:93C675:BE1583:6B00EFB4 |
| html-safe-nonce | 47b5de93830f8ba654ebbd24cdf75319bce2e94968e53d81bc0133fbd80e3591 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTk2OjRCQjc5OjkzQzY3NTpCRTE1ODM6NkIwMEVGQjQiLCJ2aXNpdG9yX2lkIjoiNTQ1MjYwNDQyNzM4NDk3NTI4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0c405db2da8e89e86f4da2d114844292dc59156b97dca6e9a5fda01308b57ccb |
| hovercard-subject-tag | issue:515691148 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/angular-react/142/issue_layout |
| twitter:image | https://opengraph.githubassets.com/df3c25f18e48297df5d1d4db5206794de8b63ad689cccc22e49c5d8aa73728e9/microsoft/angular-react/issues/142 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/df3c25f18e48297df5d1d4db5206794de8b63ad689cccc22e49c5d8aa73728e9/microsoft/angular-react/issues/142 |
| og:image:alt | I'm trying to wrap a slate editor by following the fabric examples. I can't seem to get a basic example working. I've set up a module like: import { registerElement } from '@angular-react/core' imp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bryandbs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/angular-react git https://github.com/microsoft/angular-react.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 144321557 |
| octolytics-dimension-repository_nwo | microsoft/angular-react |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 144321557 |
| octolytics-dimension-repository_network_root_nwo | microsoft/angular-react |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width