Skip to content

About

A maintained fork of react-native-modalfy for React Native 0.85+

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

@spykesocial/react-native-modalfy

Use this package instead of the broken and unmaintained react-native-modalfy.

This is a maintained fork of colorfy-software/react-native-modalfy, published as:

@spykesocial/react-native-modalfy


Why fork?

Upstream Modalfy is broken on React Native 0.85+.

In RN 0.85, StyleSheet.absoluteFillObject was removed. Upstream Modalfy still spreads that value when building its overlay styles. The result is broken modal layout — content drops into normal document flow and often ends up under the tab bar or otherwise mispositioned.

Upstream issue: colorfy-software/react-native-modalfy#203

Fix in this package

All StyleSheet.absoluteFillObject usages were replaced with StyleSheet.absoluteFill.

That restores correct absolute overlay positioning on current React Native / Expo apps.

Credit for the original RN 0.85+ fix approach: fobos531/react-native-modalfy.


Install

yarn add @spykesocial/react-native-modalfy
# or
npm install @spykesocial/react-native-modalfy

Migrating from upstream

yarn remove react-native-modalfy
yarn add @spykesocial/react-native-modalfy

Update imports:

// before
import { ModalProvider, createModalStack, useModal } from "react-native-modalfy";

// after
import {
  ModalProvider,
  createModalStack,
  useModal,
} from "@spykesocial/react-native-modalfy";

Optional yarn alias if you want to keep the old import path:

{
  "dependencies": {
    "react-native-modalfy": "npm:@spykesocial/react-native-modalfy@4.0.1"
  }
}

Usage

Same API as upstream Modalfy.

import { ModalProvider, createModalStack } from "@spykesocial/react-native-modalfy";

const stack = createModalStack(modalConfig, defaultOptions);

export default function App() {
  return (
    <ModalProvider stack={stack}>
      {/* your app */}
    </ModalProvider>
  );
}

Docs / guides: colorfy-software.gitbook.io/react-native-modalfy


Links

npm https://www.npmjs.com/package/@spykesocial/react-native-modalfy
GitHub https://github.com/spykesocial/react-native-modalfy
Upstream https://github.com/colorfy-software/react-native-modalfy
Upstream bug colorfy-software/react-native-modalfy#203

License

MIT — same as upstream react-native-modalfy.

About

A maintained fork of react-native-modalfy for React Native 0.85+

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages