Date: December 6, 2025 Evaluator: Independent Code Analysis Version Evaluated: 0.1.21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable, Subject} from 'rxjs' | |
| export type PersonId = string | |
| export interface Person { | |
| id: PersonId | |
| name: string | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable, Subject} from 'rxjs' | |
| export type PersonId = string | |
| export interface Person { | |
| id: PersonId | |
| name: string | |
| } | |
| const peopleById = new Map<PersonId, Person>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable, Subject} from 'rxjs' | |
| export type PersonId = string | |
| export interface Person { | |
| id: PersonId | |
| name: string | |
| } | |
| export const peopleData = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {BehaviorSubject, Observable} from 'rxjs' | |
| let count = 0 | |
| const count$ = new BehaviorSubject(count) | |
| export const counter = { | |
| increment() { | |
| ++count | |
| count$.next(count) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable} from 'rxjs' | |
| let count = 0 | |
| export const counter = { | |
| increment() { | |
| ++count | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Observable, Subject} from 'rxjs' | |
| type PersonId = string | |
| interface Person { | |
| id: PersonId | |
| name: string | |
| } | |
| // A type that represents simple JS objects that map personId -> person |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {connect} from 'react-rx-pure-connect' | |
| interface InternalProps { | |
| name: string | |
| } | |
| const InternalComponent = (props: InternalProps) => <h2>Name: {props.name}</h2> | |
| interface ExternalProps { | |
| personId: number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {connect} from 'react-rx-pure-connect' | |
| const Component = (props: {name: string}) => <h2>Name: {props.name}</h2> | |
| const mapProps = (props: {personId: number}) => Observable.ajax | |
| .getJSON(`/api/person/${props.personId}`) | |
| .map(person => ({name: person.name})) | |
| const Name = connect(mapProps)(Component) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {connect} from 'react-rx-pure-connect' | |
| const name$ = Observable.of('Bob') | |
| const Component = (props: {name: string}) => <h2>Name: {props.name}</h2> | |
| const mapProps = () => name$.map(name => ({name})) | |
| const Name = connect(mapProps)(Component) |