Git Product home page Git Product logo

css-vars-hook's People

Contributors

dependabot[bot] avatar kurtgokhan avatar morewings avatar renovate[bot] avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

css-vars-hook's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update commitlint monorepo to v19.2.1 (@commitlint/cli, commitlint)
  • chore(deps): update dependency @testing-library/react to v14.2.2
  • chore(deps): update dependency postcss to v8.4.38
  • chore(deps): update dependency postcss-preset-env to v9.5.2
  • chore(deps): update dependency semantic-release to v23.0.6
  • chore(deps): update dependency typescript to v5.4.3
  • chore(deps): update react monorepo (@types/react, @types/react-dom)
  • chore(deps): update dependency stylelint to v16.3.1
  • chore(deps): update dependency vite to v5.2.6
  • chore(deps): update dependency vite-plugin-dts to v3.8.1
  • chore(deps): update typescript-eslint monorepo to v7.4.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • chore(deps): update semantic-release monorepo (major) (@semantic-release/commit-analyzer, @semantic-release/release-notes-generator)

Detected dependencies

github-actions
.github/workflows/merge-jobs.yml
  • actions/checkout v4
  • styfle/cancel-workflow-action 0.12.1
  • actions/setup-node v4
  • pnpm/action-setup v2
  • actions/cache v4
.github/workflows/pages.yml
  • actions/checkout v4
  • styfle/cancel-workflow-action 0.12.1
  • actions/setup-node v4
  • pnpm/action-setup v3
  • actions/cache v4
  • actions/configure-pages v4
  • actions/upload-pages-artifact v3
  • actions/deploy-pages v4
.github/workflows/pull-request-jobs.yml
  • actions/checkout v4
  • styfle/cancel-workflow-action 0.12.1
  • actions/setup-node v4
  • pnpm/action-setup v3
  • actions/cache v4
npm
package.json
  • @commitlint/cli 19.2.0
  • @commitlint/config-conventional 19.1.0
  • @semantic-release/commit-analyzer 11.1.0
  • @semantic-release/git 10.0.1
  • @semantic-release/github 10.0.2
  • @semantic-release/npm 12.0.0
  • @semantic-release/release-notes-generator 12.1.0
  • @testing-library/jest-dom 6.4.2
  • @testing-library/react 14.2.1
  • @types/jest 29.5.12
  • @types/lodash 4.17.0
  • @types/react 18.2.66
  • @types/react-dom 18.2.22
  • @typescript-eslint/eslint-plugin 7.2.0
  • @typescript-eslint/parser 7.2.0
  • @vitejs/plugin-react 4.2.1
  • @yelo/rollup-node-external ^1.0.1
  • alias-hq 6.2.3
  • commitizen 4.3.0
  • commitlint 19.2.0
  • cz-conventional-changelog 3.3.0
  • classnames ^2.5.1
  • eslint 8.57.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-import 2.29.1
  • eslint-plugin-prettier 5.1.3
  • eslint-plugin-react 7.34.1
  • eslint-plugin-react-hooks 4.6.0
  • eslint-plugin-react-refresh 0.4.6
  • eslint-plugin-ssr-friendly 1.3.0
  • eslint-plugin-storybook 0.8.0
  • husky 9.0.11
  • identity-obj-proxy 3.0.0
  • is-ci 3.0.1
  • jest 29.7.0
  • jest-environment-jsdom 29.7.0
  • lint-staged 15.2.2
  • npm-run-all2 6.1.2
  • postcss 8.4.35
  • postcss-preset-env ^9.4.0
  • prettier 3.2.5
  • react 18.2.0
  • react-dom 18.2.0
  • semantic-release 23.0.4
  • stylelint 16.2.1
  • stylelint-config-standard 36.0.0
  • stylelint-order 6.0.4
  • stylelint-prettier 5.0.0
  • ts-jest 29.1.2
  • ts-node 10.9.2
  • typescript 5.4.2
  • vite 5.1.6
  • vite-plugin-dts ^3.7.3
  • react >=18.2.0
  • react-dom >=18.2.0
  • node >=16
nvm
.nvmrc
  • node v20

  • Check this box to trigger a request for Renovate to run again on this repository

Refactor Demo page

At the moment, demo page uses logic which requires React to rerender components. Needs to be changed to non-rendering techniques.

Improve docs add title to local and global examples

  • add title to local and global examples
  • add note about useEffect to setVariable and setTheme

The reason this code isn’t correct is that it tries to do something with the DOM node during rendering. In React, rendering should be a pure calculation of JSX and should not contain side effects like modifying the DOM.
Moreover, when VideoPlayer is called for the first time, its DOM does not exist yet! There isn’t a DOM node yet to call play() or pause() on, because React doesn’t know what DOM to create until you return the JSX.

The solution here is to wrap the side effect with useEffect to move it out of the rendering calculation:
By wrapping the DOM update in an Effect, you let React update the screen first. Then your Effect runs.

When your VideoPlayer component renders (either the first time or if it re-renders), a few things will happen. First, React will update the screen, ensuring the

Refactor useTheme

  • Make consistent with useRootTheme
  • Add docs and examples for prop bindings to achieve similar functionality as CSS in js.

getVariable gets token value from local or global scope. Maybe needs to be wrapped in useEffect

Add options support

useLocalTheme({case, ref})

<Provider case=“camel|kebab” ref={ref}/>

  1. External ref
  2. Different variable naming

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.