Expose reference from <Application /> component
Maintainers usually reply within 1 day
@abstrakt8 is already working on this.
Since Jan 31, 2026.
Assessment
This issue has not been assessed yet.
Description
Hi 👋 We’re using PlayCanvas with React in a Next.js app, where the UI and the game scene are fully separated at the top level to avoid unnecessary re-renders.
...
return (
<ManagersProvider>
{/* UI */}
<GameInterface />
{/* Game */}
<div className='game-scene'>
<Application {/* ref={appRef} */} {...gameApplicationOptions}>
<GameNext />
<Map />
</Application>
</div>
</ManagersProvider>
);
In our case, we sometimes need access to the "app" object before the scene is rendered, for example to run some preprocessing logic like asset/texture loading. Right now, this is only possible via the "useApp" hook.
If it were possible to get a ref directly from the component, it would simplify these preprocessing steps quite a bit and make the architecture cleaner.
Happy to help or discuss further if this sounds useful,
- Dominant language
- TypeScript
- Stars
- 536
- Forks
- 60
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from playcanvas/react
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
playcanvas/react#320 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
playcanvas/react#315 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
playcanvas/react#308 · 8 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
playcanvas/react#306 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
playcanvas/react#303 · 1 comment ·
Maintainers usually reply within 1 day
All issues in playcanvas/react
Similar issues
-
[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo rootOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
melgarafael/DeskcommCRM#2657 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
MystenLabs/MemWal#1163 · 2 comments ·
Maintainers usually reply within 1 day
-
Mondriaan
Difficulty 1/5 Under an hour Newbie friendliness 88/100
knaw-huc/textannoviz#709 ·
Maintainers usually reply within 1 day
-
billion-context-pi
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ranxianglei/billion-context#2521 · 3 comments ·
Maintainers usually reply within 1 day