Litho (By Facebook) v0.24.0 Release Notes

  • 2019-02-18

    Breaking: The default for state updates has changed from sync to async. At Facebook this meant we ran a codemod script on the codebase and changed all state update methods to the explicit Sync variant ("Sync" is just appended to the end of the state update call), then changed the default. The reason for this is to not change existing behavior in case it breaks something, since there are many callsites. The script is committed and available at [scripts/codemod-state-update-methods.sh](scripts/codemod-state-update-methods.sh). We recommend using it if you have any concerns about state update calls automatically becoming async. As a reminder, when you add a @OnUpdateState method, it generates three methods: updateState(), updateStateSync(), and updateStateAsync(). Previously updateState() == updateStateSync(). Now, updateState() == updateStateAsync().

    For more details, see the full diff.