<?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: Experience Builder mapExtraStateProps usecase in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1390215#M11266</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/761351"&gt;@BhaveshSuthar&lt;/a&gt;&amp;nbsp;, you just need to set Widget.mapExtraStateProps = function(state, props) {}.&amp;nbsp;This is equivalent to class component.&lt;/P&gt;&lt;P&gt;Here is the code&amp;nbsp;snippet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/** @jsx jsx */
import { React, type AllWidgetProps, type IMState } from 'jimu-core'
import { type IMConfig } from '../config'

export interface ExtraCustomWidgetProps {
  ...
}

export interface WidgetProps extends AllWidgetProps&amp;lt;IMConfig&amp;gt;, ExtraCustomWidgetProps {
  ...
}

const Widget = (props: WidgetProps): React.ReactElement =&amp;gt; {
  return (
    ...
  )
}

// define mapExtraStateProps for functional widget
Widget.mapExtraStateProps = (state: IMState, props: AllWidgetProps&amp;lt;IMConfig&amp;gt;): ExtraCustomWidgetProps =&amp;gt; {
  return {
    ...
  }
}

export default Widget&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 08:12:05 GMT</pubDate>
    <dc:creator>QunSun</dc:creator>
    <dc:date>2024-03-04T08:12:05Z</dc:date>
    <item>
      <title>Experience Builder mapExtraStateProps usecase</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1377437#M10641</link>
      <description>&lt;P&gt;Hello everyone in the community!&lt;/P&gt;&lt;P&gt;So I am creating a custom widget using functional component and I need to use the &lt;STRONG&gt;mapExtraStateProps&lt;/STRONG&gt; function in my component, I know that in class component I just need to define the function and is internally invoked. But how does this work in functional component?&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 06:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1377437#M10641</guid>
      <dc:creator>BhaveshSuthar</dc:creator>
      <dc:date>2024-02-02T06:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Experience Builder mapExtraStateProps usecase</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1377447#M10642</link>
      <description>&lt;P&gt;I found in the documentation that we can use useSelect similar to useSelector in Redux. How to import useSelect?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 07:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1377447#M10642</guid>
      <dc:creator>BhaveshSuthar</dc:creator>
      <dc:date>2024-02-02T07:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Experience Builder mapExtraStateProps usecase</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1390215#M11266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/761351"&gt;@BhaveshSuthar&lt;/a&gt;&amp;nbsp;, you just need to set Widget.mapExtraStateProps = function(state, props) {}.&amp;nbsp;This is equivalent to class component.&lt;/P&gt;&lt;P&gt;Here is the code&amp;nbsp;snippet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/** @jsx jsx */
import { React, type AllWidgetProps, type IMState } from 'jimu-core'
import { type IMConfig } from '../config'

export interface ExtraCustomWidgetProps {
  ...
}

export interface WidgetProps extends AllWidgetProps&amp;lt;IMConfig&amp;gt;, ExtraCustomWidgetProps {
  ...
}

const Widget = (props: WidgetProps): React.ReactElement =&amp;gt; {
  return (
    ...
  )
}

// define mapExtraStateProps for functional widget
Widget.mapExtraStateProps = (state: IMState, props: AllWidgetProps&amp;lt;IMConfig&amp;gt;): ExtraCustomWidgetProps =&amp;gt; {
  return {
    ...
  }
}

export default Widget&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 08:12:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/experience-builder-mapextrastateprops-usecase/m-p/1390215#M11266</guid>
      <dc:creator>QunSun</dc:creator>
      <dc:date>2024-03-04T08:12:05Z</dc:date>
    </item>
  </channel>
</rss>

