<?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 Pass typescript class as a parameter to navigation between pages in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pass-typescript-class-as-a-parameter-to-navigation-between-pages/m-p/227322#M594</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a newbee to TypeScript: I have created a custom typescript class and I need to pass an instance of it from one page to the other. Is it even possible?&lt;/P&gt;&lt;P&gt;I know I can pass JsonObject using the useNavigate hook for example but this will not include all of the class functionalities.&lt;/P&gt;&lt;P&gt;How would you handle this? Should it just be as a single page with different components rendered based on the state of it and using "global" page variable with the class instance?&lt;/P&gt;&lt;P&gt;Gil.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2023 15:27:15 GMT</pubDate>
    <dc:creator>gilgi</dc:creator>
    <dc:date>2023-11-01T15:27:15Z</dc:date>
    <item>
      <title>Pass typescript class as a parameter to navigation between pages</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pass-typescript-class-as-a-parameter-to-navigation-between-pages/m-p/227322#M594</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a newbee to TypeScript: I have created a custom typescript class and I need to pass an instance of it from one page to the other. Is it even possible?&lt;/P&gt;&lt;P&gt;I know I can pass JsonObject using the useNavigate hook for example but this will not include all of the class functionalities.&lt;/P&gt;&lt;P&gt;How would you handle this? Should it just be as a single page with different components rendered based on the state of it and using "global" page variable with the class instance?&lt;/P&gt;&lt;P&gt;Gil.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 15:27:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pass-typescript-class-as-a-parameter-to-navigation-between-pages/m-p/227322#M594</guid>
      <dc:creator>gilgi</dc:creator>
      <dc:date>2023-11-01T15:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pass typescript class as a parameter to navigation between pages</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pass-typescript-class-as-a-parameter-to-navigation-between-pages/m-p/227375#M595</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/12008"&gt;@gilgi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a question about how to manage states within React.&lt;/P&gt;
&lt;P&gt;If you don't have a complex component structure, you can share the states between components by lifting the state up and passing props. Please check out this page for more detailed examples:&amp;nbsp;&lt;A href="https://react.dev/learn/sharing-state-between-components" target="_blank"&gt;https://react.dev/learn/sharing-state-between-components&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For more complex component structure I would suggest that you use context:&amp;nbsp;&lt;A href="https://react.dev/learn/passing-data-deeply-with-context" target="_blank"&gt;https://react.dev/learn/passing-data-deeply-with-context&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Sini&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 07:41:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Pass-typescript-class-as-a-parameter-to-navigation-between-pages/m-p/227375#M595</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-11-02T07:41:24Z</dc:date>
    </item>
  </channel>
</rss>

