public lotId$ = new Subject<number>();
@Input() public set lotId(value: number) {
this.lotId$.next(value);
};
public results$ = this.lotId$.asObservable().pipe(
skipWhile(lotId => !lotId),
switchMap(lotId => this.logicService.getMappedTakeOffTasksForLot(lotId)),
tap(con
如何将ChildComponent中的hello值传递给App组件,并在页面加载时将其存储在ChildComponent的childProps变量中。
import React, { Component } from 'react';
class App extends Component {
render() {
var childProps ''; // I want store the passed const value in this variable;
return (
<div>
<Ch