Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const userProfileIsOldEnough = () => {
return userProfile.age > 18;
export default { userProfileIsOldEnough };
import 'userProfileIsOldEnough' from 'comparisons.js';
const what = ({api}) => {
const userProfile = api.fetchUserProfile();
// Question: How can I allow userProfileIsOldEnough to access userProfile without
// passing it as an arg?
if (userProfileIsOldEnough()) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.