Skip to content

Conversation

@fladrif
Copy link

@fladrif fladrif commented Mar 24, 2025

Update bgio-effects to work with boardgame.io v.50

@fladrif fladrif force-pushed the feat/update-bgio-version branch from 7e93724 to 061fdc2 Compare March 25, 2025 04:06
@ShahnawazHussain28
Copy link

@fladrif
Does this PR work with latest version of bgio ?

@fladrif
Copy link
Author

fladrif commented Oct 8, 2025

@ShahnawazHussain28 Yep, but bgio needs an update if you plan on using this with a server + typescript. The server currently doesn't recognize additional plugin types in the GameState. I have another MR open there boardgameio/boardgame.io#1217 that would be needed to use this plugin.

@ShahnawazHussain28
Copy link

@fladrif You are absolutely right. As a workaround the following can work for now:

    moves: {
      executeAction: ({ G, ctx, random, events, effects }) => {
        const typedEffects = effects as EffectsCtxMixin<typeof effectsConfig>['effects']
        typedEffects.rollDice({
            result: random.Die()
        })
      }
    }

I also want to mention that it still doesn't support react 19. So to use this either you have to use react 18 or specify --legacy-peer-deps or --force while installing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants