BuilderIO / BuilderIO/mitosis

core: Can't assign "props" to "state"

Open
#388 8 comments 0 reactions 0 assignees View on GitHub
bug core
Dominant language
TypeScript
Stars
14.4k
Forks
671
PR merge metrics
No merged PRs in 30d

Description

we need a way to assign `props` to `state`
https://github.com/BuilderIO/mitosis/blob/main/docs/gotchas.md#cant-assign-params-to-state

we can either inject the workaround into onMount or for some generators

Contributor guide

Open the contributing guide

Research direction

Start with docs/gotchas.md at “Can’t assign params to state” to understand the current limitation and workaround. Then inspect the compiler’s generator handling and the onMount path to determine whether the behavior belongs in generated output or a shared transformation. Done means props can be assigned to state without requiring the documented workaround, with the affected generators covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.