recoil#atom JavaScript Examples

The following examples show how to use recoil#atom. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 6 votes vote down vote up
componentsAtom = atom({
  key: "componentsAtom",
  default: [
    {
      id: 0,
      name: "Home",
      type: "FunctionalArrow",
      page: true,
    },
    {
      id: 1,
      name: "NavBar",
      type: "FunctionalArrow",
      page: false,
    },
  ],
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #2
Source File: atoms.js    From recoil-paint with MIT License 6 votes vote down vote up
canvasLayoutState = atom({
  key: 'canvasLayoutState',
  default: {
    x: 0,
    y: 0,
    width: 800,
    height: 600,
  }
})
Example #3
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 6 votes vote down vote up
routeAtom = atom({
  key: "routeAtom",
  default: {
    enabled: false,
    navigation: "NavBar",
  },
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #4
Source File: auth.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
$authInfo = atom({
  key: 'personiumAuthInfo',
  default: null,
})
Example #5
Source File: users.js    From react-recoil-jwt-authentication-example with MIT License 5 votes vote down vote up
usersAtom = atom({
    key: 'users',
    default: null
})
Example #6
Source File: atoms.js    From recoil-testing with MIT License 5 votes vote down vote up
id = atom({
  key: 'id',
  default: 1,
})
Example #7
Source File: PersoniumBarInstaller.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
$installStatus = atom({
  key: 'bar_install_status',
  default: [],
})
Example #8
Source File: PersoniumBarInstaller.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
$installing = atom({
  key: 'bar_installing',
  defualt: false,
})
Example #9
Source File: auth.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
isLogin = atom({
  key: 'personiumIsLogin',
  default: false,
})
Example #10
Source File: auth.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
tokens = atom({
  key: 'personiumTokens',
  default: null,
})
Example #11
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 5 votes vote down vote up
highlightAtom = atom({
  key: "highlightAtom",
  default: 0,
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #12
Source File: auth.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
$barInstalled = atom({
  key: 'personiumBarInstalled',
  default: null,
})
Example #13
Source File: state.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
$localMode = atom({
  key: 'app_launched_locally',
  default: false,
})
Example #14
Source File: DetailPage.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
locationId = atom({
  key: 'userLocationId',
  default: null,
})
Example #15
Source File: LocationPage.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
locationQuery = atom({
  key: 'searchLocationQuery',
  default: {
    year: null,
    month: null,
    day: null,
  },
})
Example #16
Source File: ProfilePage.js    From app-personium-trails with Apache License 2.0 5 votes vote down vote up
_introspection = atom({
  key: 'profileTokenIntrospection',
  default: null,
})
Example #17
Source File: globalState.js    From HealthBridge with GNU General Public License v3.0 5 votes vote down vote up
userAtom = atom({
	key: "userAtom",
	default: JSON.parse(localStorage.getItem("user")),
	persistence_UNSTABLE: {
		type: "log",
	},
})
Example #18
Source File: globalState.js    From HealthBridge with GNU General Public License v3.0 5 votes vote down vote up
tokenAtom = atom({
	key: "tokenAtom",
	default: localStorage.getItem("token"),
	persistence_UNSTABLE: {
		type: "log",
	},
})
Example #19
Source File: state.js    From minecraft-react with MIT License 5 votes vote down vote up
$cubes = atom({
  key: 'cubes',
  default: []
})
Example #20
Source File: auth.js    From react-recoil-jwt-authentication-example with MIT License 5 votes vote down vote up
authAtom = atom({
    key: 'auth',
    // get initial state from local storage to enable user to stay logged in
    default: JSON.parse(localStorage.getItem('user'))
})
Example #21
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 5 votes vote down vote up
projectNameAtom = atom({
  key: "projectNameAtom",
  default: "my-app",
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #22
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 5 votes vote down vote up
buildToolAtom = atom({
  key: "buildToolAtom",
  default: "yarn",
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #23
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 5 votes vote down vote up
dependenciesToAddAtom = atom({
  key: "dependenciesToAddAtom",
  default: "react-router-dom",
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #24
Source File: GlobalState.js    From react-builder with GNU General Public License v3.0 5 votes vote down vote up
environmentAtom = atom({
  key: "enivironmentAtom",
  default: "create-react-app",
  persistence_UNSTABLE: {
    type: "log",
  },
})
Example #25
Source File: atoms.js    From web-frontend with MIT License 5 votes vote down vote up
sessionState = atom({
  key: "sessionState",
  default: { userid: "", token: "", logged: false },
})
Example #26
Source File: atoms.js    From web-frontend with MIT License 5 votes vote down vote up
bodyState = atom({
  key: "bodyState",
  default: "",
})
Example #27
Source File: recoilState.js    From basis with MIT License 5 votes vote down vote up
isInspectModeState = atom({
  key: "playgroundIsInspectMode",
  default: false,
})
Example #28
Source File: recoilState.js    From basis with MIT License 5 votes vote down vote up
componentPreviewCounterState = atom({
  key: "playgroundComponentPreviewCounter",
  default: 0,
})
Example #29
Source File: recoilState.js    From basis with MIT License 5 votes vote down vote up
screensState = atom({
  key: "playgroundScreens",
  default: [],
})