Skip to content

A couple questions about this repo #14

@avidrucker

Description

@avidrucker
  1. What is the difference between re-frame and freerange?
  2. Is freerange meant for Nextjournal internal usage primarily, NJ internal usage only, or, is it perhaps suitable for external use as well?

Rationale: It'd be helpful to see what was the use-case for freerange, what problems it is intended to solve, and is there a desire to develop further, etc..

As a starter for question 1, just from sampling the first two PRs:

from PR#1: A re-frame fork that eschews global state, plus a React Context based API for providing an alternative state, e.g. in devcards.

- move registry and event-queue state into re-frame.core
- make make-restore-fn use core/registry
- turn public API into protocol and singleton in re-frame.core
- refactor subs-cache; integrate into frame singleton
- allow parameteriziation of default interceptors
- late binding of the frame in subscription/cofx/fx
	- Make sure subscriptions and events use the frame that is passed to `subscribe`/`dispatch`, and not the frame that they are registered on, so that it is possible to re-use registries across frames.
	- This also removes re-frame.db, since it's now vestigial, and removes re-frame.registrar, since that has been reincarnated into re-frame.registry.
- Provide an API for providing/consuimg the frame from a context
	- ...
- Rename the-frame to default-frame, fix reg-sub-raw
	- ...
- local var app-db no longer used
- fix bug "Make lein test-once pass again"
	- This did find a bug, where the frame reference given to the event-queue does not contain the event-queue reference itself, so that chained dispatching doesn't work. Fixed by adding mutability on the event-queue so we can have a circular frame<->event-queue reference. In the long run it might be better to push a reference on the queue together with each event, so the queue doesn't need access to the frame.
	- Removed some deprecated and commented-out code.
	- Made sure fetching a undefined fx handler only prints one warning, not two.
	- Generally made the tests more frame-aware.

from PR#2: support 2-arity import-with-frame for def-like var resolution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions