Code & Deploy
siGit Code
Git Hosting
Toggle menu
Code
Code Review
Models
Repos
Sign in
Sign in
@samitouri
/
QOS-React-2
QOS-React-2
/
compiler
/
packages
/
babel-plugin-react-compiler
/
src
/
__tests__
/
fixtures
/
compiler
/
allow-passing-ref-to-render-helper.js
Code
Commits
Issues
Pulls
Sessions
CI/CD
main
main
js
9 lines
203 Bytes
Copy permalink
Copy
Raw
1
// @enableTreatRefLikeIdentifiersAsRefs @validateRefAccessDuringRender
2
3
import
{
useRef
}
from
'
react
'
;
4
5
function
Component
(
props
)
{
6
const
ref
=
useRef
(
null
);
7
8
return
<
Foo
>
{
props
.
render
(
ref
)}
<
/Foo>
;
9
}