meteor / meteor/react-packages
withTracker with async code
- Dominant language
- JavaScript
- Stars
- 575
- Forks
- 168
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the withTracker implementation in the react-meteor-data package and review how the example uses Meteor.callAsync. Check the discussion and linked pull request #404 for prior context. Done would require a decided, tested approach for supporting asynchronous work without rendering before awaited data is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100