]> git.cworth.org Git - lmno.games/commit
Return null from GameInfo and PlayerInfo if they have no populated props
authorCarl Worth <cworth@cworth.org>
Fri, 5 Jun 2020 17:26:25 +0000 (10:26 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 11:46:51 +0000 (04:46 -0700)
commit79ef861f4341e20501e9c540f9ed9c81ba52204b
treed475149e4a897361d5bf935c3cfc9f80bc22017a
parent80b53fb35b2026f0100572fc744d659532efe3f0
Return null from GameInfo and PlayerInfo if they have no populated props

These info objects get filled in with data that is streamed from the
server "/events" API. While the page is still loading, we don't want
to brifly see the skeleton of these objects drawn with no real data
inside them.

It's much cleaner to return null instead. This gives a clean result
where these sections of the page only appear when fully formed.
tictactoe/tictactoe.jsx