withTracker with async code

オープン
#393 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #404 @StorytellerCZ による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, react
領域
frontend

調査の方向性

まず、react-meteor-data パッケージ内の withTracker の実装を見つけ、例で Meteor.callAsync をどのように使用しているかを確認します。これまでの経緯を把握するため、議論とリンクされている pull request #404 を確認します。await したデータが利用可能になる前にレンダリングせずに非同期処理をサポートするための、方針が決定されテスト済みのアプローチができれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi developers,

I wanted to ask if it is possible to use the withTracker function call in combination with the asynchronous call that will be introduced in Meteor 3.0

I have a large application where I use the container architecture with React components
Example of container...

`import { withTracker } from 'meteor/react-meteor-data';
import {useDeps} from '@beisen/storybook-mantra-core';
import _ from 'lodash';

import locales from '../components/locales.jsx';
import {Locales} from '/lib/collections';

export const depsMapper = (context) => ({
context: () => context
});

const localesWT = withTracker(({context, id}) => {

const {Log, LocalState} = context();

let localesArray = Locales.find({language: 'en'}).fetch();

return {
localesArray
};
})(locales);

export default useDeps(depsMapper)(localesWT);
`

In the withTracker function I would like to call asynchronously however currently the content is rendered and does not wait for await...

Can we expect the withTracker function to be modified for use with Meteor.callAsync ?

Thanks

主要言語
JavaScript
スター
577
フォーク
165
平均マージ
2日 6時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

meteor/react-packages のほかの issue

meteor/react-packages の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。