Skip to content

Releases: reflex-dev/reflex

v0.5.9

06 Aug 23:25
72465a7
Compare
Choose a tag to compare

Bug Fixes

Doc Updates

Var Refactor

This release includes some new experimental features being developed incrementally in reflex._x.vars.

Full Changelog: v0.5.8...v0.5.9

v0.5.8

29 Jul 19:59
e80315d
Compare
Choose a tag to compare

New Features

  • update init prompt to use new templates from reflex-dev/templates by @Lendemor in #3677

Improvements

Bug Fixes

  • debounce: pass through key and special_props by @masenf in #3655
  • [REF-3135]Radix Primitive components should not ignore provided class_name prop by @ElijahAhianyo in #3676
  • [REF-3101] rx.list Dont set/hardcode list_style_position css prop by @ElijahAhianyo in #3695
  • [REF-3184] [REF-3339] Background task locking improvements by @masenf in #3696
  • [REF-3375] useMemo on generateUUID props to maintain consistent value by @masenf in #3708
  • Define BaseVar fields on ComputedVar by @paoloemilioserra in #3659

Var Refactor

This release includes some new experimental features being developed incrementally in reflex._x.vars.

Other Changes

New Contributors

Full Changelog: v0.5.7...reflex-0.5.8

v0.5.7

16 Jul 20:47
9a7e5a0
Compare
Choose a tag to compare

New Features

  • Catch unhandled errors on both frontend and backend by @maximvlah in #3572
    • rx.App now supports frontend_exception_handler and backend_exception_handler which are called when unhandled exceptions occur.
    • Fix the error boundary by @maximvlah in #3637
  • Bare SQLAlchemy mutation tracking by @benedikt-bartscher in #3628
  • feat: Adding an event to go back just as the user would. by @abulvenz in #3636
    • return rx.event.back()

Improvements

Bug Fixes

Documentation

Var Refactor

This release includes some new experimental features being developed incrementally in reflex._x.vars.

Other Changes

  • pyproject.toml: bump to 0.5.6 by @masenf in #3635
  • benchmarks.yml: use node 18.x with reflex-web@main by @masenf in #3657

New Contributors

Full Changelog: v0.5.6...v0.5.7

v0.5.6

09 Jul 00:32
a115b3f
Compare
Choose a tag to compare

New Features

rx.clipboard

Handle global and component-scoped on_paste with multi-type data

  • Add Clipboard component for handling global on_paste event by @masenf in #3513

rx.breakpoints - Set breakpoints by name

Computed Backend Vars

Improvements

  • [REF-3056]Config knob for redis StateManager expiration times by @ElijahAhianyo in #3523
  • [Perf] Ensure rx.match gets memoized to avoid excessive re-rendering by @masenf in #3552
  • bare sqlalchemy session + tests by @benedikt-bartscher in #3522
  • Remove chakra from codeblock by @abulvenz in #3570
  • add compilation timestamp in log by @Lendemor in #3563
  • [REF-3148] add props for tabs by @Lendemor in #3560
  • show the value causing problem in deprecation warning by @Lendemor in #3558
  • Better support for Github Codespaces
    • Add a link to backend in connection error by @masenf in #3044
  • Better hot reload times on Windows with python 3.12 and uvicorn > 0.20
    • [REF-3164] Hack to fix Windows hot reload + Uvicorn upgrade by @masenf in #3584
  • rx.theme appearance is reset in dev mode

Bug Fixes

Other Changes

New Contributors

Welcome Khaleel to the Core Team

Full Changelog: v0.5.5...v0.5.6

v0.5.5

25 Jun 01:37
7d91e44
Compare
Choose a tag to compare

New Features

Improvements

Bug Fixes

Other Changes

New Contributors

Full Changelog: v0.5.4...v0.5.5

v0.5.4

13 Jun 17:45
19ef2e6
Compare
Choose a tag to compare

Improvements

Bug Fixes

  • [REF-2602]Do not suppress import errors in rxconfig by @ElijahAhianyo in #3434
  • [REF-3006] Inline code rendered in rx.markdown has extra trailing space by @masenf in #3426
  • Address an issue with pydantic v2 models as Vars by @kroo in #3396
  • state.js: set event_processing = false when websocket connects by @masenf in #3443
  • [REF-2879] Make client_state work without global refs (local only) by @masenf in #3379

Other Changes

New Contributors

Full Changelog: v0.5.3...v0.5.4

v0.5.3

05 Jun 20:27
1f3fee5
Compare
Choose a tag to compare

New Features

Improvements

Each component import is now independently lazy

Save time by avoiding imports for components which are not used in the app.

Bug Fixes

Other Changes

New Contributors

Full Changelog: v0.5.2...v0.5.3

v0.5.2

30 May 23:59
f9c008a
Compare
Choose a tag to compare

New Features

Lifespan Tasks

A lifespan task is either a coroutine which runs while the backend server is running and is cancelled when the server stops, or it can be an asynccontextmanager in which case it will run at server startup until yield is called, then it will resume as the server is shutting down. In either case, the task is started and stopped during hot reload.

Any keyword arguments passed to app.register_lifespan_task will be passed to the coroutine/contextmanager. If the coroutine takes a parameter called app, this will be an instance of the underlying FastAPI object.

Sample Code
import asyncio
from contextlib import asynccontextmanager


def fake_answer_to_everything_ml_model(x: float):
    return x * 42


ml_models = {}


@asynccontextmanager
async def setup_model(app: FastAPI):
    # Load the ML model
    ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
    yield
    # Clean up the ML models and release the resources
    ml_models.clear()


async def long_running_task(foo, bar):
    print(f"Starting {foo} {bar} task")
    some_api = SomeApi(foo)
    try:
        while True:
            updates = some_api.poll_for_updates()
            other_api.push_changes(updates, bar)
            await asyncio.sleep(5)  # add some polling delay to avoid running too often
    except asyncio.CancelledError:
        some_api.close()  # clean up the API if needed
        print("Task was stopped")


app = rx.App()
app.register_lifespan_task(setup_model)
app.register_lifespan_task(long_running_task, foo=42, bar=os.environ["BAR_PARAM"])

Improvements

Bug Fixes

Readme Updates

Other Changes

New Contributors

Full Changelog: https://github.com/reflex-dev/reflex/compare/v0.5.1..v0.5.2

v0.5.1

22 May 00:20
4cfa0e3
Compare
Choose a tag to compare

New Features

  • Connection Error modal is now a dismissable toast by @Lendemor in #3242
  • rx._x.client_state: react useState Var integration for frontend and backend by @masenf in #3269
    • Work in progress, API subject to change
  • Support replacing route on redirect by @masenf in #3072

Improvements

Bugfixes

Dependencies

Other Changes

  • [REF-2776] enable telemetry for frontend package download subprocess by @martinxu9 in #3270
  • [REF-2774] Add ReflexError and subclasses, send in telemetry by @martinxu9 in #3271
  • [REF-2774] Send runtime error in telemetry by @martinxu9 in #3276
  • Automatically label bug report issues with bug tag by @ericwb in #3288
  • [REF-2803]Add imports benchmarks by @ElijahAhianyo in #3272
  • Mirgrate from pip to uv by @ericwb in #3285
  • Adds dependency review action to verify allowed licensed dependencies by @ericwb in #3306

New Contributors

Full Changelog: v0.5.0.post1...v0.5.1

v0.5.0.post1

15 May 01:52
25c1406
Compare
Choose a tag to compare

Escape Hatch to avoid Bun on Windows

These exceptions only apply to Windows native platform (not WSL)

  • [REF-2814]Throw Warning for Projects Created in OneDrive on Windows (#3304)
    • Skip bun when project path contains "onedrive"
    • Skip bun when REFLEX_USE_NPM=1 (environment variable)

Full Changelog: v0.5.0...v0.5.0.post1