felangel / bloc.js

A predictable state management library that helps implement the BLoC design pattern in JavaScript
https://bloclibrary.dev
190 stars 22 forks source link

feat: React Bloc: BlocProvider & BlocConsumer #29

Open prateek14 opened 4 years ago

prateek14 commented 4 years ago

Status

IN DEVELOPMENT

Breaking Changes

NO

Description

APIs for BlocProvider and BlocConsumer using React Context API

Type of Change

prateek14 commented 4 years ago

I'll update the test phase

codecov-commenter commented 4 years ago

Codecov Report

Merging #29 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #29   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         3    -1     
  Lines          111        84   -27     
  Branches         9        13    +4     
=========================================
- Hits           111        84   -27     
Impacted Files Coverage Ξ”
packages/react-bloc/lib/src/bloc-builder.tsx 100.00% <100.00%> (ΓΈ)
packages/react-bloc/lib/src/bloc-consumer.tsx 100.00% <100.00%> (ΓΈ)
packages/react-bloc/lib/src/bloc-provider.tsx 100.00% <100.00%> (ΓΈ)
packages/bloc/lib/src/transition.ts
packages/bloc/lib/src/bloc-observer.ts
packages/bloc/lib/src/bloc.ts

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 8980710...8c5d91b. Read the comment docs.

MrSquaare commented 3 years ago

:wave: What's the current status of this PR?

felangel commented 3 years ago

πŸ‘‹ What's the current status of this PR?

Hey thanks for bringing this back to my attention! I'll try to take another this this week and hopefully clean up and get something release very soon πŸ‘

Lonli-Lokli commented 3 years ago

Hei @felangel did you have a chance to check it?

Rukkaitto commented 2 years ago

This is the only absent feature that is keeping me from using bloc.js in production. Would be great if this was merged.

felangel commented 2 years ago

I'll try to take a look over the weekend and get this merged, sorry for the delay here!

lgoudin commented 2 years ago

news on this? would be a nice alternative to passing the bloc through useContext

felangel commented 2 years ago

news on this? would be a nice alternative to passing the bloc through useContext

Sorry keep getting side-tracked! Will try to make time today πŸ‘