Skip to content

Commit

Permalink
fix: set mobx store as local state
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonella Sgarlatta committed Sep 7, 2021
1 parent 28dab13 commit 99ef854
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { WebApplication } from '@/ui_models/application';
import { FunctionalComponent } from 'preact';
import { useState } from 'preact/hooks';
import { Subscription } from './Subscription';
import { SubscriptionState } from './subscription_state';

Expand All @@ -10,7 +11,7 @@ type Props = {
export const SubscriptionWrapper: FunctionalComponent<Props> = ({
application,
}) => {
const subscriptionState = new SubscriptionState();
const [subscriptionState] = useState(() => new SubscriptionState());
return (
<Subscription
application={application}
Expand Down

0 comments on commit 99ef854

Please sign in to comment.