Skip to content

make env configurable #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2017
Merged

make env configurable #26

merged 1 commit into from
Apr 5, 2017

Conversation

timsuchanek
Copy link
Contributor

We have a static React App that is being prerendered with prep.
As prep runs in the browser, we need a way to specify our own environment detection.
In our case it's

if (navigator.userAgent === 'SSR') {env = 'node'}

Thanks for this awesome project!

@codecov
Copy link

codecov bot commented Apr 5, 2017

Codecov Report

Merging #26 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   97.56%   97.56%           
=======================================
  Files           3        3           
  Lines          82       82           
=======================================
  Hits           80       80           
  Misses          2        2
Impacted Files Coverage Δ
src/asyncComponent.js 97.01% <100%> (ø) ⬆️

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 42a9d60...f53bfe7. Read the comment docs.

@ctrlplusb
Copy link
Owner

Hey @timsuchanek!

Thanks for this! Interesting use case. Happy to merge. 👍

@ctrlplusb ctrlplusb merged commit 3b0ccff into ctrlplusb:master Apr 5, 2017
@ctrlplusb
Copy link
Owner

Curse of the merge! Just thought of a slightly better implementation​. Allow the env to be set on the AsncComponentProvider. Then it just needs setting once.

@timsuchanek
Copy link
Contributor Author

That's a good point! I may create another pull request for that change :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants