Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Uppercase components and push to stream #316

Open
Assignees
pedrobslisboa
@pedrobslisboa

Description

@pedrobslisboa

I notice while doing somearch tests that we are wrongly pushing Upper_case_components to the stream while we should pushingnodes
Take the following code as an example:

constBar=()=>{return"Baz"}constFoo=()=>{return(<Bar/>)}constApp=()=>{return(<Foo/>)};const{ pipe}=renderToPipeableStream(<App/>);
Ocaml test code
letnested_upper_case_components()=letapp()=React.Upper_case_component      ("app",fun() ->React.Upper_case_component ("Foo",fun() ->React.Upper_case_component ("Bar",fun() ->React.string"Bar"))      )inlet output, subscribe= capture_stream()inlet%lwt()=ReactServerDOM.render_model~subscribe (app())in  assert_list_of_strings!output ["2:\"Bar\"\n";"1:\"$2\"\n";"0:\"$1\"\n"];Lwt.return()

The result on our current code is:["2:\"Bar\"\n"; "1:\"$2\"\n"; "0:\"$1\"\n"]
While react's result is:0:"Baz"

And that makes sense as the Upper_case_components isn't a content to be pushed, unlike Lower_case_elements / Json values / etc ...

We should change the way we push our content.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp