<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom visualization with React in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235342#M235</link>
    <description>&lt;P&gt;I packaged visual and import it to PowerBI Desktop and it worked, but like I wrote earlier today something wrong is going with a developer&amp;nbsp;preview of visual at app.powerbi.com.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created completely new visual, nothing changed and it is not working too. It seems that update is not called by the&amp;nbsp;&lt;SPAN&gt;app.powerbi.com. The same situation has my colleague, so it is not a case on my computer.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2017 14:55:56 GMT</pubDate>
    <dc:creator>mda</dc:creator>
    <dc:date>2017-08-21T14:55:56Z</dc:date>
    <item>
      <title>Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/233382#M229</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create custom visual with React, but it seems I cant'd do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did?:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Install &lt;STRONG&gt;powerbi-visuals-tools@1.7.2&lt;/STRONG&gt; wich is the &lt;STRONG&gt;latest version&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Created new visual with&amp;nbsp;&lt;STRONG&gt;pbiviz new reacttest&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In reacttest directory run:&lt;UL&gt;&lt;LI&gt;npm install --save react react-dom&lt;/LI&gt;&lt;LI&gt;npm install --save-dev @types/react @types/react-dom&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now when I try to start vizualization with&amp;nbsp;pbiviz start it shows me a lot of errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;error TYPESCRIPT reacttest/node_modules/@types/react-dom/index.d.ts : (15,5) Module '"reacttest/node_modules/@types/react/index"' has no exported member 'DOMAttributes'.&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react-dom/index.d.ts : (42,22) Generic type 'Component&amp;lt;P, S&amp;gt;' requires 2 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react-dom/index.d.ts : (57,22) Generic type 'Component&amp;lt;P, S&amp;gt;' requires 2 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react-dom/index.d.ts : (62,22) Generic type 'Component&amp;lt;P, S&amp;gt;' requires 2 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react-dom/index.d.ts : (67,22) Generic type 'Component&amp;lt;P, S&amp;gt;' requires 2 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (50,29) Generic type 'AnimationEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (51,29) Generic type 'ClipboardEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (52,31) Generic type 'CompositionEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (53,24) Generic type 'DragEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (54,25) Generic type 'FocusEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (55,28) Generic type 'KeyboardEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (56,25) Generic type 'MouseEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (57,25) Generic type 'TouchEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (58,30) Generic type 'TransitionEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (59,22) Generic type 'UIEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;error TYPESCRIPT reacttest/node_modules/@types/react/index.d.ts : (60,25) Generic type 'WheelEvent&amp;lt;T&amp;gt;' requires 1 type argument(s).&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;I didn't change visual.ts and nowhere import React or ReactDOM. I've only tried to add&amp;nbsp;&lt;STRONG&gt;"jsx": &lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;"react"&lt;/STRONG&gt; to &lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt; but it didn't change anything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My package.json looks like:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{
  "name": "visual",
  "dependencies": {
    "powerbi-visuals-utils-dataviewutils": "1.2.0",
    "react": "^15.6.1",
    "react-dom": "^15.6.1"
  },
  "devDependencies": {
    "@types/react": "^16.0.2",
    "@types/react-dom": "^15.5.3"
  }
}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;tsconfig.json:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;{
  "compilerOptions": {
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "jsx": "react",
    "sourceMap": true,
    "out": "./.tmp/build/visual.js"
  },
  "files": [
    ".api/v1.7.0/PowerBI-visuals.d.ts",
    "node_modules/powerbi-visuals-utils-dataviewutils/lib/index.d.ts",
    "src/settings.ts",
    "src/visual.ts"
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;pbiviz.json is unchanged. I tried to add&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;    "node_modules/react/dist/react-with-addons.js",
    "node_modules/react-dom/dist/react-dom.js",&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;to&amp;nbsp;&lt;/SPAN&gt;externalJS but it didn't worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 15:15:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/233382#M229</guid>
      <dc:creator>mda</dc:creator>
      <dc:date>2017-08-17T15:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/233900#M230</link>
      <description>&lt;P&gt;Please install types for TypeScript 2.1 because of fact that PBIVIZ uses TS 2.1.&lt;/P&gt;&lt;PRE&gt;npm install --save-dev @types/react@15.0.20&amp;nbsp;@types/react-dom@15.5.0&lt;/PRE&gt;&lt;P&gt;We have a task to upgrade TS version to the most recent. We'll implement&amp;nbsp;this soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 07:09:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/233900#M230</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-08-18T07:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/234018#M231</link>
      <description>&lt;P&gt;Thanks, it helped with typescript typings, but it didn't help with using React with Visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did below things:&lt;/P&gt;&lt;P&gt;1. &lt;SPAN&gt;In src folder create a new file "reactAdapter.js" with below content:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var React = typeof React !== 'undefined'
    ? React
    : window.React;
var ReactDOM = typeof ReactDOM !== 'undefined'
    ? ReactDOM
    : window.ReactDOM;&lt;/PRE&gt;&lt;P&gt;2. To file&amp;nbsp;&lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt;&amp;nbsp;add these lines under&amp;nbsp;&lt;STRONG&gt;files&lt;/STRONG&gt;&amp;nbsp;node:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;"node_modules/react/dist/react.min.js",
"node_modules/react-dom/dist/react-dom.min.js",
"src/reactAdapter.js",&lt;/PRE&gt;&lt;P&gt;Without code above React and ReactDOM are undefined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now in visual.ts when I add this line it is working:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;ReactDOM.render(React.createElement("p", null, `Update count: ${(this.updateCount++)}`), this.target);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I create a&amp;nbsp;new file called &lt;STRONG&gt;hello.tsx&amp;nbsp;&lt;/STRONG&gt;and add it to&amp;nbsp;&lt;STRONG&gt;tsconfig.json&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;interface HelloProprs {
    toWhat?: string
}

class Hello extends React.Component&amp;lt;HelloProprs, {}&amp;gt; {
    render() {
        console.log("render", this.props);
        return &amp;lt;div&amp;gt;Hello {this.props.toWhat}&amp;lt;/div&amp;gt;
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now during starting, I'm getting:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;error TYPESCRIPT /src/hello.tsx : (5,21) Type 'any' is not a constructor function type.&lt;BR /&gt; error TYPESCRIPT /src/hello.tsx : (7,36) Property 'props' does not exist on type 'Hello'.&lt;BR /&gt; error TYPESCRIPT /src/hello.tsx : (8,33) Property 'props' does not exist on type 'Hello'.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have to say, that when I declare the same React component in jsx file it is working great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 09:10:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/234018#M231</guid>
      <dc:creator>mda</dc:creator>
      <dc:date>2017-08-18T09:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/234961#M233</link>
      <description>&lt;P&gt;You shouldn't include JS files into tsconfig.json.&amp;nbsp;JS should be inclued into externalJS property of pbiviz.json (whole file is attached for good context):&lt;/P&gt;&lt;PRE&gt;{
  "visual": {
    "name": "reacttest",
    "displayName": "reacttest",
    "guid": "reacttestADA2C64F50954106925BC15E56CC2F27",
    "visualClassName": "Visual",
    "version": "1.0.0",
    "description": "",
    "supportUrl": "",
    "gitHubUrl": ""
  },
  "apiVersion": "1.7.0",
  "author": {
    "name": "",
    "email": ""
  },
  "assets": {
    "icon": "assets/icon.png"
  },
  "externalJS": [
    "node_modules/react/dist/react-with-addons.js",
    "node_modules/react-dom/dist/react-dom.js",
    "src/reactAdapter.js"
  ],
  "style": "style/visual.less",
  "capabilities": "capabilities.json",
  "dependencies": "dependencies.json",
  "stringResources": []
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Aug 2017 07:39:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/234961#M233</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-08-21T07:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235119#M234</link>
      <description>&lt;P&gt;Well, it helped with compilation. Code now compiles without errors but it is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've put&amp;nbsp;&lt;SPAN&gt;ReactDOM&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;render into try statement and there is no error, but since today my React component is not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The same thing is with my jsx component which was working on Friday.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did guys from Microsoft change something at app.powerbi.com?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 09:45:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235119#M234</guid>
      <dc:creator>mda</dc:creator>
      <dc:date>2017-08-21T09:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235342#M235</link>
      <description>&lt;P&gt;I packaged visual and import it to PowerBI Desktop and it worked, but like I wrote earlier today something wrong is going with a developer&amp;nbsp;preview of visual at app.powerbi.com.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created completely new visual, nothing changed and it is not working too. It seems that update is not called by the&amp;nbsp;&lt;SPAN&gt;app.powerbi.com. The same situation has my colleague, so it is not a case on my computer.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 14:55:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235342#M235</guid>
      <dc:creator>mda</dc:creator>
      <dc:date>2017-08-21T14:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235884#M236</link>
      <description>&lt;P&gt;Our React sample visual works well on Power BI App (&lt;A href="https://app.powerbi.com" target="_blank"&gt;https://app.powerbi.com&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Do you use powerbi-visuals-utils-dataviewutils in your tsconfig.json? If so, please include&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js&amp;nbsp;&lt;/STRONG&gt;into externalJS property of pbiviz.json.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Aug 2017 08:06:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235884#M236</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-08-22T08:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visualization with React</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235908#M237</link>
      <description>&lt;P&gt;&lt;STRONG&gt;node_modules/powerbi-visuals-utils-dataviewutils/lib/index.js&lt;/STRONG&gt; was added by default by pbiviz new.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today it started to working again, so thanks for the help.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 08:23:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visualization-with-React/m-p/235908#M237</guid>
      <dc:creator>mda</dc:creator>
      <dc:date>2017-08-22T08:23:43Z</dc:date>
    </item>
  </channel>
</rss>

