Reflex

Latest version: v0.6.5

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 14

0.3.1

Not secure

0.3.0

Not secure
Breaking Changes

Drop Python 3.7 Support

* Drop python3.7 support by masenf in https://github.com/reflex-dev/reflex/pull/2003

Victory charts are completely removed in this release.

Graph and chart functionailty has been replaced by Recharts, see [the docs](https://reflex.dev/docs/library/graphing/areachart/) for more examples.

* Remove victory charts by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1945

Removal of Deprecated Browser Storage API

* Deprecate rx.get_cookies by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1961
* Remove 0.3.0 deprecated features by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1947

rx.Var Fields are Renamed

Most users are not interacting the `Var` class directly, but if you are, the following fields have been renamed:

* `name` -> `_var_name`
* `type_` -> `_var_type`
* `state` -> `_var_state`
* `is_local` -> `_var_is_local`
* `is_string` -> `_var_is_string`

This allows `rx.Base` and `rx.Model` classes using these field names to be accessed through State vars.

* Var field cleanup by masenf in https://github.com/reflex-dev/reflex/pull/1943
* Replace renamed Var.type_ with _var_type by masenf in https://github.com/reflex-dev/reflex/pull/2039

Prop Values are Validated

Each component prop now defines values as `typing.Literal`, which has two effects:

* In IDEs, the allowed values for a field will be prominently displayed.
* When compiling, invalid literal values for props will raise an exception.

The following code will now raise `ValueError`

python
rx.button("Foo", color_scheme="silly")


console
ValueError: prop value for color_scheme of the `Button` component should be one of the following: none,gray,red,orange,yellow,green,teal,blue,cyan,purple,pink,whiteAlpha,blackAlpha,linkedin,facebook,messenger,whatsapp,twitter,telegram. Got 'silly' instead


If you _need_ to pass an unrecognized prop value, you can wrap it in an `rx.Var`.

python
rx.button("Foo", color_scheme=rx.Var.create("silly"))


* Props as Literals by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1921

New Features

New Base Template

When running `reflex init` in a new directory, a multi-page template will be deployed instead of the Welcome to Reflex page. This provides a better starting point for more complex apps.

Use `reflex init --template blank` to generate a new app with the previous template.

* Added base template + improve templating code by Alek99 in https://github.com/reflex-dev/reflex/pull/1937
* [REF-876] Update base template styles by masenf in https://github.com/reflex-dev/reflex/pull/2022
* Update base template styling by picklelo in https://github.com/reflex-dev/reflex/pull/2050
* Update base template by picklelo in https://github.com/reflex-dev/reflex/pull/2027

New Component: `rx.data_editor`

Based on the Glide Data Grid, the new `rx.data_editor` component supports in place editing of data tables and is more feature rich than the existing `rx.data_table` component.

See [the docs](https://reflex.dev/docs/library/datadisplay/dataeditor/) for more examples and details.

(Note: pandas dataframe is not currently supported, but will be coming soon)

* Lendemor/add datagrid editor by Lendemor in https://github.com/reflex-dev/reflex/pull/1941
* fix editable column and theme casting by Lendemor in https://github.com/reflex-dev/reflex/pull/2051

State.router

The `State.router` property provides access to the current page's router data in a way that can be accessed from both the frontend and the backend.

Previous `State.get_current_page()`, `State.get_query_params()`, and others are now deprecated.

* deprecate get_ methods for router_data, use BaseVars instead by Lendemor in https://github.com/reflex-dev/reflex/pull/1967

New component: `rx.moment`

Simple date/time formatting on the frontend, and provides an event trigger that can be fired peridically from the frontend.

* Wrap Moment Component by Lendemor in https://github.com/reflex-dev/reflex/pull/1994
* [react-moment](https://www.npmjs.com/package/react-moment) is used under the hood.

Reflex Hosting Preview

This release includes support for the new Reflex Hosting service, currently in closed testing, please reach out on Discord for more information.

* [REF-99] Add first version of CLI for hosting service by martinxu9 in https://github.com/reflex-dev/reflex/pull/1810
* [reflex hosting] clean up tmp dir for storing zip archives by jackie-pc in https://github.com/reflex-dev/reflex/pull/2021
* CLI switch to prod server by martinxu9 in https://github.com/reflex-dev/reflex/pull/2016
* CLI improvements by martinxu9 in https://github.com/reflex-dev/reflex/pull/2026
* add region check upfront when user deploys interactively by martinxu9 in https://github.com/reflex-dev/reflex/pull/2030
* CLI will not set auto/stop setting for deployment by martinxu9 in https://github.com/reflex-dev/reflex/pull/2040
* Add back build log command to CLI by martinxu9 in https://github.com/reflex-dev/reflex/pull/2053

Demo App

Running `reflex demo` will now open a demo app based on the new base template showing some reflex features.

* Tom/template demo app by tgberkeley in https://github.com/reflex-dev/reflex/pull/2046
* Add CLI demo command by Alek99 in https://github.com/reflex-dev/reflex/pull/2044
* Use demo app for reflex demo command by picklelo in https://github.com/reflex-dev/reflex/pull/2048
* Update demo command to open demo.reflex.run by picklelo in https://github.com/reflex-dev/reflex/pull/2059

(Currently using a remotely hosted version of the app, but subsequent release will run the demo app locally.)

Radix Themes Preview

Reflex is moving away from Chakra-UI component to [Radix-UI](https://www.radix-ui.com/themes/docs/overview/getting-started). And some of the new components are available in this release for testing in the `reflex.components.radix.themes` module. More details to follow.

* [REF-668] Wrap MyApp with radix Theme component by masenf in https://github.com/reflex-dev/reflex/pull/1867
* [REF-938] Fix up radix themes issues by masenf in https://github.com/reflex-dev/reflex/pull/2002

Improvements

Automatic `API_URL`

Most users will not have to explicitly set `API_URL` unless their frontend and backend are running on different hosts or via a load balancer.

When the default `API_URL` of `http://localhost:{backend_port}` is used, and the frontend is not being accessed on `localhost`, assume that the backend and frontend are on the same host.

* [REF-843] Automatically update api_url and deploy_url by masenf in https://github.com/reflex-dev/reflex/pull/1954

Support for Static Sites

Do not display the connection error banner or attempt to connect to the backend if the app does not use State.

* No state No Websocket by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1950
* Remove Default state by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1978

Improve `reflex export`

* Support exporting to zip archives to a dir that is not cwd (to be use by hosting cli) by jackie-pc in https://github.com/reflex-dev/reflex/pull/2005
* [reflex export] backend.zip excludes dirs that look like venv dirs by jackie-pc in https://github.com/reflex-dev/reflex/pull/2009

Access Relationship Attributes on `rx.Model`

* Improve Var type handling for better rx.Model attribute access by masenf in https://github.com/reflex-dev/reflex/pull/2010

Autogenerate missing `requirements.txt`

An app must have a `requirements.txt` to be deployed via the hosting service, so Reflex will create one based on top-level packages in the environment where it is running.

* Autogenerating Dependencies During Deployment by Alek99 in https://github.com/reflex-dev/reflex/pull/2033

Support `callback` in `rx.call_script`

When running arbitrary script, it is now possible to pass the result back to an Event Handler. See [the updated docs](https://reflex.dev/docs/api-reference/browser_javascript/) for more examples.

* Support callback for rx.call_script by masenf in https://github.com/reflex-dev/reflex/pull/2045

Miscellaneous

* Warn when computed vars raise an exception by masenf in https://github.com/reflex-dev/reflex/pull/1939
* Stop double compiles in dev mode by picklelo in https://github.com/reflex-dev/reflex/pull/1990
* Improve Event handler Error message by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/2019
* Relax wrapt dependency for tensorflow compatibility by masenf in https://github.com/reflex-dev/reflex/pull/2001

Bug Fixes

* Fix custom components special props by picklelo in https://github.com/reflex-dev/reflex/pull/1956
* Fix charts not displaying without specifying width and height
* ChartBase.create: include default min dimensions (RESUB) by masenf in https://github.com/reflex-dev/reflex/pull/1975
* Fix Cookie and LocalStorage values being reset on navigation
* convert initialEvents to a function by masenf in https://github.com/reflex-dev/reflex/pull/1982
* Bug: changing type of playing by Billa05 in https://github.com/reflex-dev/reflex/pull/1986
* Rehydrate client storage after rx.remove_local_storage and rx.remove_cookies by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1998
* multi_select somewhat usable by masenf in https://github.com/reflex-dev/reflex/pull/1861
* fix fnm version check by Lendemor in https://github.com/reflex-dev/reflex/pull/2014
* Resolve npm path and fnm path on Windows by masenf in https://github.com/reflex-dev/reflex/pull/2015
* Radix Themes style notation fix by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/2025
* Generate state delta from processed state instance by masenf in https://github.com/reflex-dev/reflex/pull/2023
* fix onload method not working in prod mode (and hosting) by Lendemor in https://github.com/reflex-dev/reflex/pull/2049
* Add none to color scheme literal by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/2055

README translations

* Translated README.md file in Italian (IT) by LucianCrainic in https://github.com/reflex-dev/reflex/pull/1946
* Translate README.md file in Korean by starcat37 in https://github.com/reflex-dev/reflex/pull/2011
* docs: fixed hindi translation by smty2018 in https://github.com/reflex-dev/reflex/pull/2018

Other Changes

* bun version bump to 1.0.4 by masenf in https://github.com/reflex-dev/reflex/pull/1942
* Bump to v0.2.9 by picklelo in https://github.com/reflex-dev/reflex/pull/1953
* AppHarness: support headless mode and driver selection by masenf in https://github.com/reflex-dev/reflex/pull/1963
* Lighthouse Test CI by Alek99 in https://github.com/reflex-dev/reflex/pull/1974
* format: event arg values use backticks by masenf in https://github.com/reflex-dev/reflex/pull/1926
* fix serialization as a whole for list/dict/Base containing custom items to serialize by Lendemor in https://github.com/reflex-dev/reflex/pull/1984
* Fix AppHarness tests by masenf in https://github.com/reflex-dev/reflex/pull/1987
* test_app: cleanup state_name logic and fixup get_sid() call by masenf in https://github.com/reflex-dev/reflex/pull/1993
* Fix posthog by picklelo in https://github.com/reflex-dev/reflex/pull/1992
* Refactor pyi_generator to use AST directly by masenf in https://github.com/reflex-dev/reflex/pull/2034
* Remove .pyc and __pycache__ from template dir by masenf in https://github.com/reflex-dev/reflex/pull/2056

New Contributors
* LucianCrainic made their first contribution in https://github.com/reflex-dev/reflex/pull/1946
* Billa05 made their first contribution in https://github.com/reflex-dev/reflex/pull/1986
* starcat37 made their first contribution in https://github.com/reflex-dev/reflex/pull/2011
* smty2018 made their first contribution in https://github.com/reflex-dev/reflex/pull/2018
* tgberkeley made their first contribution in https://github.com/reflex-dev/reflex/pull/2046

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.2.9...v0.3.0

0.2.9

Not secure
Breaking Changes

`rx.constants` module refactored

- Many names have changed for better organization and namespacing of the growing number of constant values.
- `rx.constants` is not really a public API, but some existing code may have been accessing values in this module.
- code cleanup (split constants into a folder) by Lendemor in https://github.com/reflex-dev/reflex/pull/1866

New Features

Core Graphing Library is now [Recharts](https://recharts.org/api)

The API for rendering charts and graphs has changed.

- See the [docs](https://reflex.dev/docs/library/graphing/areachart/) for examples and more information.
- Victory charts are deprecated and will be removed in a subsequent release.
- `rx.data` is no longer used.
- https://github.com/reflex-dev/reflex/pull/1878

Run Arbitrary Javascript from Event Handler

- rx.call_script: a real EventHandler to execute arbitrary javascript by masenf in https://github.com/reflex-dev/reflex/pull/1860

Redirect into New Window

- `return rx.redirect("https://google.com", external=True)` to open page in new tab/window
- allow external link for redirect by Lendemor in https://github.com/reflex-dev/reflex/pull/1902

HTML Editor Component

- Add **Editor** component by masenf in https://github.com/reflex-dev/reflex/pull/1851

Improvements

- Allow arbitrary Reflex components to map to markdown tags for more customizable styling.
- Improvements to custom styles in rx.markdown by picklelo in https://github.com/reflex-dev/reflex/pull/1852
- Fix custom style rendering in markdown by picklelo in https://github.com/reflex-dev/reflex/pull/1869
- Improve default rx.markdown styling by picklelo in https://github.com/reflex-dev/reflex/pull/1904
- Include scripts in `<head>` for every page by setting `head_components` prop in `rx.App`
- Add head components to app by picklelo in https://github.com/reflex-dev/reflex/pull/1868
- Adding Missing Props to `button`, `button_group`, and `circular_progress`
- Add button spinner_placement prop by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1871
- Button Group variant and size props by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1873
- circular_progress cleanup: size, thickness, label by masenf in https://github.com/reflex-dev/reflex/pull/1879
- Add `Readme.md` for turkish language by 09u2h4n in https://github.com/reflex-dev/reflex/pull/1922
- Pin frontend package versions by picklelo in https://github.com/reflex-dev/reflex/pull/1920
- More reliable deploys without bringing in unexpected upstream changes

Bug Fixes

- component: `imports` override `_get_dependencies_imports` by masenf in https://github.com/reflex-dev/reflex/pull/1859
- Fix regression where `rx.table` stopped working with state Var
- rx.table `__bool__` regression fix by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1828
- `MutableProxy` fixes when accessing `list`, `dict`, or `set` vars on a State
- MutableProxy wraps values yielded by `__iter__` by masenf in https://github.com/reflex-dev/reflex/pull/1876
- State.reset uses deepcopy on defaults by masenf in https://github.com/reflex-dev/reflex/pull/1889
- state: `get_value` unwraps MutableProxy first by masenf in https://github.com/reflex-dev/reflex/pull/1887
- state: subclass of MutableState must return _mark_dirty return value by masenf in https://github.com/reflex-dev/reflex/pull/1898
- fix rx.image src not working with state by Lendemor in https://github.com/reflex-dev/reflex/pull/1915
- fix menu items= API by Lendemor in https://github.com/reflex-dev/reflex/pull/1905
- Lendemor/fix backward compat of menu api by Lendemor in https://github.com/reflex-dev/reflex/pull/1925

Other Changes

- Bump to v0.2.8 by picklelo in https://github.com/reflex-dev/reflex/pull/1855
- Format event handlers not in importable modules by picklelo in https://github.com/reflex-dev/reflex/pull/1875
- Add a placeholder timeout to GitHub Actions unit tests by jackwcodes in https://github.com/reflex-dev/reflex/pull/1897
- test_state: assert popped value is the actual value by masenf in https://github.com/reflex-dev/reflex/pull/1906
- Deprecate set_cookie and set_local_storage by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1917
- Add forward slash to local JS import by picklelo in https://github.com/reflex-dev/reflex/pull/1924
- Update Deprecations by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1927

New Contributors

- jackwcodes made their first contribution in https://github.com/reflex-dev/reflex/pull/1897
- 09u2h4n made their first contribution in https://github.com/reflex-dev/reflex/pull/1922

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.2.8...v0.3.0

0.2.8

Not secure
✨ This release is made possible in part by users like YOU! ✨

Breaking Changes

`CopyToClipboard` component has been removed.

Use the [`rx.set_clipboard` special event](https://reflex.dev/docs/api-reference/special-events/#set_clipboard) instead.

New Features

`get_event_triggers` API

The new `Component.get_event_triggers` API combines the old `get_triggers` and `get_controlled_triggers` methods into a unified API (the previous methods will continue to work in 0.2.8, but wrapped components should move to the new API).

The new API is more flexible, providing control over handler and trigger argument mapping. The method is expected to return a dictionary of callables. The keys are the names of the triggers in the react component. The values are callables whose **signature** defines the javascript trigger signature and the **return value** is a list of args that will be passed to the python `EventHandler` function.

This allows wrapping of components that accept non-standard event handler functions. Typically a `lambda` is used to map arguments, but a regular function with type annotations can also be used to enable extended Var operations like indexing.

For example, the `FormSelect` component uses a non-standard signature for `on_change`, this can now be accomodated in the new API.

python
class FormSelect(rx.Component):
library = "patternfly/react-core"
tag = "FormSelect"

def get_event_triggers(self) -> Dict[str, Any]:
return {
EventTriggers.ON_CHANGE: lambda _e, value: [value],
}



- New API to define triggers by Lendemor in https://github.com/reflex-dev/reflex/pull/1820

`rx.download` special event

The new download event prompts the frontend browser for file download.

It can be used directly as an event trigger:

python
rx.button("Download file", on_click=rx.download("/uri/for/file.extension", "target_file.extension")



Or it can be yielded from a backend event handler:

python
def export_data(self):
...
do export logic here and write to filepath
then
yield rx.download(filepath, filename)



- add download event by Lendemor in https://github.com/reflex-dev/reflex/pull/1797

Register Serializers for Custom Types

A one-arg callable in a Reflex app or component module with `rx.serializer` decorator will be considered a serializer for the type of its argument. This allows arbitrary types used on the backend to be accessed on the frontend, as long as there is a serializer defined that returns a JSON serializable value.

For example, the following code is used to serialize plotly `Figure` objects.

python
import json
from plotly.graph_objects import Figure
from plotly.io import to_json

rx.serializer
def serialize_figure(figure: Figure) -> list:
return json.loads(str(to_json(figure)))["data"]



- Add serializers for different var types by picklelo in https://github.com/reflex-dev/reflex/pull/1816

Background Task Event Handlers that do not block other Events

An `async` `EventHandler` function in a `State` that is decorated with `rx.background` is considered a **"Background Task"**. When triggered by the frontend or chained from another event handler, it will spawn a long running task that will NOT block other EventHandlers from running.

There are three main differences from a normal `EventHandler` to be aware of:

- Background Task *must* be `async`
- Background Task cannot directly modify state values and state values *may be stale* if other events have modified the state since the task started running.
- Only read or write state vars inside an `async with self` context block, where exclusive access to the latest state is guaranteed.
- Background Task cannot be directly called from another event handler.
- Must `yield` or `return` the background task to chain it from another handler.

python
class State(rx.State):

counter: int = 0

rx.background
async def bg_task(self):
for ix in range(10):
async with self:
state mutation is only allowed inside context block
self.counter += 1

await long operations outside the context to avoid blocking
await asyncio.sleep(0.5)



Full documentation for this feature is still being developed. Please post comments regarding background tasks on the [discussion thread](https://github.com/orgs/reflex-dev/discussions/1838).

- rx.background and StateManager.modify_state provides safe exclusive access to state by masenf in https://github.com/reflex-dev/reflex/pull/1676

Improvements

Support Reactivity for `rx.Base` fields

Modifying fields on an `rx.Base` instance will trigger updates in the state without having to reassign them. This also applies when working with fields that are container types such as `list` and `dict`.

- Reassign state Var when fields on a Base instance change by masenf in https://github.com/reflex-dev/reflex/pull/1748

Better Error Messages

- Style props with Callable Values by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1751
- Type Validation for Var Operations and Enhanced Compatibility by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1674

Usability

- Allow underscores in routes by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1713
- Implemented color_scheme for Tabs Component by raven-black-dream in https://github.com/reflex-dev/reflex/pull/1792
- Simplify base rxconfig by picklelo in https://github.com/reflex-dev/reflex/pull/1821
- Number input float by raven-black-dream in https://github.com/reflex-dev/reflex/pull/1817
- Support custom styling for code in markdown by picklelo in https://github.com/reflex-dev/reflex/pull/1844
- add option to disable Tailwind by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1842

Bug Fixes

- added check to remove local import starting from . by wassafshahzad in https://github.com/reflex-dev/reflex/pull/1807
- exec: print the URL, not the address the server binds to by masenf in https://github.com/reflex-dev/reflex/pull/1846

Minor Changes and Fixups

- use actions/checkoutv4 by masenf in https://github.com/reflex-dev/reflex/pull/1768
- Bump version to 0.2.7 by picklelo in https://github.com/reflex-dev/reflex/pull/1782
- check pyi generations are up to date by jackie-pc in https://github.com/reflex-dev/reflex/pull/1786
- supply default for rx.Model PK for both DB and python to work by martinxu9 in https://github.com/reflex-dev/reflex/pull/1788
- move dynamic imports to dedicated method by Lendemor in https://github.com/reflex-dev/reflex/pull/1785
- removed is_read_only from select by wassafshahzad in https://github.com/reflex-dev/reflex/pull/1799
- numberinput: check `_id is not None` to avoid Var truthiness warning by masenf in https://github.com/reflex-dev/reflex/pull/1806
- Remove deprecated route decorator by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1815
- Move custom styles to root App file(_app.js) by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1764
- Disable metrics in CI by picklelo in https://github.com/reflex-dev/reflex/pull/1822
- Remove extra imports from rx.markdown by picklelo in https://github.com/reflex-dev/reflex/pull/1837
- Prevent Substate class shadowing by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1827
- pyproject.toml: add `packaging` to dep list by masenf in https://github.com/reflex-dev/reflex/pull/1839
- state: implement **copy** and **deepcopy** for MutableProxy by masenf in https://github.com/reflex-dev/reflex/pull/1845
- allow for non-installable imports by Lendemor in https://github.com/reflex-dev/reflex/pull/1843
- Format component as React string by picklelo in https://github.com/reflex-dev/reflex/pull/1848
- use jinja2 to render package.json by Lendemor in https://github.com/reflex-dev/reflex/pull/1849
- StateProxy rebinds functools.partial and methods that are bound to the proxied State by masenf in https://github.com/reflex-dev/reflex/pull/1853

New Contributors

- raven-black-dream made their first contribution in https://github.com/reflex-dev/reflex/pull/1792

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.2.7...v0.2.8

0.2.7

Not secure
🙏 Thanks to our supportive community and helpful contributors! 💪

Breaking Changes

Default Websocket Endpoint is now `/_event` 1542

Upload endpoint also moved to `/_upload`.

Any reverse proxy configurations that were explicitly forwarding `/event` and `/upload` to the backend server should be updated to use the new endpoints.

- renamed reserved endpoints of Reflex by Lendemor in 1542
- Caddyfile: reflex uses `/_event` and `/_upload` now by masenf in 1726

`App` kwarg `connect_error_component` is removed.

Use `overlay_component` instead. (1379)

New Features

Client-side Storage integrated with State 1629

- Allow `rx.LocalStorage` and `rx.Cookie` type vars in a State class that are automatically persisted in the client browser when modified on the backend.
- These values can be used in frontend or backend code just like any other state Var.

python
class State(rx.State):
my_token: rx.LocalStorage = ""
my_hour_cookie: rx.Cookie = rx.Cookie("initial", max_age=3600)

def set_token(self):
self.my_token = str(uuid.uuid4())

def update_cookie(self):
if self.my_hour_cookie == "initial":
self.my_hour_cookie = "updated"


Implement `on_mount` and `on_unmount` for all components 1636

These new event handlers, present on all components, tie into React’s `useEffect` hook and are used to trigger backend events needed to initialize a component when it loaded in a page.

Note: `on_mount` will fire twice in dev mode due to the use of React’s StrictMode.

Note: `on_mount` will not fire for page navigation events between different params of the same dynamic route, since the page itself does not get reloaded so no remount occurs. For navigation events, see `on_load` argument of `app.add_page`.

FNM is now used to install nodejs on POSIX platforms

by ElijahAhianyo in 1606 1701

`frontend_packages` are automatically determined 1607

- `frontend_packages` are inferred based on the `library` prop of a wrapped component, instead of having to specify them manually in the `rxconfig.py` file.
- The `library` prop may now include a version pin, like **`library =** "gridjs-react^6.0.1"`
- The `package.json` list of frontend dependencies only includes components that are *actually used* in the app, which decreases bundle size.
- To include additional dependencies used by a component, specify them in the new `lib_dependencies` prop of the wrapped component.

Per-component prop autocompletion for IDEs 1708

Generated `.pyi` files provide better function signatures for component `create` methods, enumerating most recognized props.

Further enhancements will be supplied in a future release to include per-prop documentation and improved signatures for event handlers.

Support Breakpoints in VSCode and PyCharm 1653

- Breakpoints set in the IDE will be respected when running the project in dev mode. See [DEBUGGING.md](https://github.com/reflex-dev/reflex/blob/main/docs/DEBUGGING.md) for an example.

Expose `basePath` configuration option 1724

Support running multiple reflex apps from the same domain by changing the `basePath` prefix that the frontend uses (by nevdelap).

Improvements

- Validate component children by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1647
- Refactor zipping in `reflex export` by martinxu9 in https://github.com/reflex-dev/reflex/pull/1668
- Avoid leaking secrets in log files and on the console.
- fix:issue-1667;added if condition check to not echo DB_URL by shashank40 in https://github.com/reflex-dev/reflex/pull/1681
- Automatically display a Modal when the backend is unable to connect.
- ConnectionModal and ConnectionBanner cleanup by masenf in https://github.com/reflex-dev/reflex/pull/1379
- Add contains, reverse operations for Var by martinxu9 in https://github.com/reflex-dev/reflex/pull/1679
- Add special var for upload: clear_selected_files by martinxu9 in https://github.com/reflex-dev/reflex/pull/1703
- Support automatic serialization of date, datetime, time, and timedelta Vars in a State class.
- added changes for datetime by wassafshahzad in https://github.com/reflex-dev/reflex/pull/1745
- Raise TypeError when attempting to incorrectly use a state Var in a `bool` or `iter` context.
- Var: `__**bool__**` and `__**iter__**` always raise a TypeError by masenf in https://github.com/reflex-dev/reflex/pull/1750
- Allow dynamic routes to work with static hosting (github pages, netlify, s3, etc)
- Client-side Routing (404 redirect) by masenf in https://github.com/reflex-dev/reflex/pull/1695
- Fix browser error when navigating to missing route and custom 404 page is not used.
- No need to run the frontend nodejs process, see updated `docker-example`.

Bug Fixes

- ReflexList: reassign field on `insert` by masenf in https://github.com/reflex-dev/reflex/pull/1652
- Allow event handlers in parent state to be directly called from child state.
- state: _init_event_handlers recursively by masenf in https://github.com/reflex-dev/reflex/pull/1640
- Allow `rx.form` to work with debounce inputs
- [REF-526] debounce_input should respect child ref by masenf in https://github.com/reflex-dev/reflex/pull/1717
- Track var dependencies in comprehensions and nested functions by masenf in https://github.com/reflex-dev/reflex/pull/1728
- Proper serialization for chained Event payloads by masenf in https://github.com/reflex-dev/reflex/pull/1725

Minor Changes and Fixups

- Upgrade to v0.2.6 by picklelo in https://github.com/reflex-dev/reflex/pull/1669
- Revert "Use DebounceInput wrapper for fully controlled Editable" by martinxu9 in https://github.com/reflex-dev/reflex/pull/1670
- Use stream_logs for frontend process by picklelo in https://github.com/reflex-dev/reflex/pull/1682
- Fix run frontend only by picklelo in https://github.com/reflex-dev/reflex/pull/1706
- Update zh_cn README.md by sszzz830 in https://github.com/reflex-dev/reflex/pull/1685
- fix: correct the zh_cn README by milochen0418 in https://github.com/reflex-dev/reflex/pull/1716
- Fix setting substate client storage by picklelo in https://github.com/reflex-dev/reflex/pull/1723
- Avoid compile step when running production backend by masenf in https://github.com/reflex-dev/reflex/pull/1665
- AppHarness: disable telemetry for test apps by masenf in https://github.com/reflex-dev/reflex/pull/1733
- state: _init_mutable_fields for backend vars as well by masenf in https://github.com/reflex-dev/reflex/pull/1729
- Fix project hash and modernize type annotations by picklelo in https://github.com/reflex-dev/reflex/pull/1704
- Refactor: Move format_prop Static Method for Improved Reusability by ElijahAhianyo in https://github.com/reflex-dev/reflex/pull/1714
- ConnectionModal uses Cond for rendering by masenf in https://github.com/reflex-dev/reflex/pull/1739
- remove some packages requirements in frontend_packages option by Lendemor in https://github.com/reflex-dev/reflex/pull/1700
- App: only render default overlay_component when DefaultState is not used by masenf in https://github.com/reflex-dev/reflex/pull/1744

New Contributors

- shashank40 made their first contribution in https://github.com/reflex-dev/reflex/pull/1681
- sszzz830 made their first contribution in https://github.com/reflex-dev/reflex/pull/1685
- nevdelap made their first contribution in https://github.com/reflex-dev/reflex/pull/1724

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.2.6...v0.2.7

0.2.6

Not secure
A quick follow-up release to fix issues discovered and reported by our thriving community on Discord. 💪

Fix Regressions

Ensure non-sqlite databases can be used 1661

- model: only pass "check_same_thread" arg for sqlite database by masenf in https://github.com/reflex-dev/reflex/pull/1662

Block problematic upstream package `python-engineio-4.6.0` 1658

- pyproject.toml: requires python-engineio!=4.6.0 by masenf in https://github.com/reflex-dev/reflex/pull/1663

Other Changes

- Added the `step` prop to `Slider`[Issue 1639] by muddi900 in https://github.com/reflex-dev/reflex/pull/1643
- added support for limits in pagination by wassafshahzad in https://github.com/reflex-dev/reflex/pull/1646
- add type conversion for int,float in built-in setters by Lendemor in https://github.com/reflex-dev/reflex/pull/1660

New Contributors

- muddi900 made their first contribution in https://github.com/reflex-dev/reflex/pull/1643

**Full Changelog**: https://github.com/reflex-dev/reflex/compare/v0.2.5...v0.2.6

Page 8 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.