Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Guilherme Samuel
    @gsdeveloper
    If you prefer to not render your entire page (Imo is bad for user experience), just level up to your entire component isSuccess ? <Page /> : null
    In these examples isSuccess is a state value that's set as true when your fetch is successful
    @jkytoela looking cool
    Sadanand Akshay Pai
    @sadanandpai
    A collection of JavaScript modern interview code challenges for beginners to experts
    https://github.com/sadanandpai/javascript-code-challenges
    Baruch Yochai
    @baruchyochai

    Hi Everyone,

    Error: Couldn't find a style target. How to fix it?

    I had a CSR app and now implemented Server-Side Rendering (SSR) with React, and get this error

    Error: Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid

    Get this error when I run the server and try to access the page.
    Tech sack in use: nodejs, reactjs, antdesign, babel and webpack.
    I already tried a lot of solutions from StackOverflow and other sources, nothing helped! Please, help me to solve it.

    Thank you!

    1 reply
    Sultan Haider
    @sultan-haider

    Hey There,
    I have been trying to run my react application on a subdirectory .
    I am using a load balancer (ALB) to and redirecting my application on "directory" from "https://mydomain/directory".
    But static file of the build was not being found by my application

    1. added direcctory on package.json. "homepage": "/directory"
    2. added basename on react-router-dom

    in my networks index.html is looking for ".#####/directory/static/js" and css in the same way

    i am only able to run my react build by redirecting static request to my react build, but this is not the good solution because i want to run 3 applications on my ALB and this will cause me change my assets folder name manually in the build, obviously don't want to do that.
    I have been applying multiple solutions but couldn't find a proper solution please someone help in this.😑

    m3tpfbzr
    @m3tpfbzr
    Hey All,
    Can I ask something about Java here?
    Shingo OKAWA
    @ognis1205
    Hi there, I'm newbie here and React.js. Recently I implemented NES emulator on TypeScript/React.js. Please check it out! (Still WIP and some codes are still messy though)
    https://github.com/ognis1205/nests
    Marc
    @Markcial

    Hi good morning, I would like to have some feedback about this https://github.com/Markcial/inducer
    Is it already done elsewhere? Is there something that can be done better?
    Can I get the TS compiler to be able to type hint the actions?
    Can i have a partial shape for the state but not making it all optional?

    thanks

    ignascode
    @ignascode
    image.png
    Hello, I am new with React and I face some issues. After I add onClick attribute to execute function it does not execute. Maybe anyone can advise me why it is so ?
    image.png
    image.png
    Matteo Bruni
    @matteobruni
    Hi guys, I created this CodeSandbox sample https://codesandbox.io/s/tsparticles-confetti-2zql1 with a confetti animation made with tsParticles for React
    Mayank Aggarwal
    @Mayank0255

    Hello everyone,
    This is Mayank Aggarwal, and I'm a pre-final year student at Manipal University Jaipur pursuing BTech in Information Technology.

    Portfolio - https://mayank0255.github.io
    GitHub - https://github.com/Mayank0255
    Linkedin - https://www.linkedin.com/in/mayank-aggarwal-14301b168/

    Olusola Ajayi
    @ebzeal
    Hi guys, I am trying to rotate images in an array, this array consists of URLs of images from azure. How do I rotate these images to like 90 degrees?
    Sultan
    @sultan99
    use css to rotate them
    Alamgir Ahamed Saif
    @alamgir72435
    Hyy. everyone
    @sultan99
    Saptak Bhoumik
    @SaptakBhoumik

    Hi good morning, I would like to have some feedback about this https://github.com/SaptakBhoumik/WebPlus
    Is there something that can be done better?It

    thanks

    Yifan Ai
    @yifaneye
    Hi everyone!
    To learn hooks, I wrote a Carousel component with support for touch, mouse dragging, lazy loading, pinch to zoom, thumbnails, modal and keyboard navigation.
    The source code is at https://github.com/yifaneye/react-gallery-carousel.
    The live demo is at https://yifanai.com/rgc.
    I would love to hear your feedback and recommendations! :)
    Thank you in advance!
    Saptak Bhoumik
    @SaptakBhoumik
    @yifaneye it's great
    Hi everyone, I wrote a web browser in python
    using the pyqt5 framework and I would like to have some feedback about this. Source code is at :- https://github.com/SaptakBhoumik/WebPlus
    Is there something that can be done better?
    I would love to hear your feedback and recommendations! :)
    Thank you in advance!
    Dev-Lorenzo Satta Chiris
    @devlorenzo:matrix.org
    [m]
    The most complete javascript cheat sheet and resource compilation you can find online!
    https://dev.to/devlorenzo/200-js-resources-to-master-programming-3aj6
    Kontributer
    @Kontributer
    I didn’t get far, but that cheat sheet has bad info. Scoping is not determined by the keyword constructor; var, let, and const can all be globally defined as well as block-scoped. The context in where they are defined is pertinent to their characteristics.
    Dev-Lorenzo Satta Chiris
    @devlorenzo:matrix.org
    [m]

    Thx for your feedback, I modifed that, even if I'm not completly sure that's wrong.

    but that cheat sheet has bad info
    You know, it took me 8 hours to write, so obviously let me know what other I can improve...

    @Kontributer

    Kontributer
    @Kontributer
    Nice work. Keep it up. I’d recommend using MDN as opposed to W3Schools. Also, the for-loop, instead of statements labeling what those statements are (control/setup, condition expression, iteration/stepwise expression).
    1 reply
    Dev-Lorenzo Satta Chiris
    @devlorenzo:matrix.org
    [m]
    Mayank Aggarwal
    @Mayank0255

    Hello everyone

    I am Mayank Aggarwal, a 3rd year student pursuing Btech in Information Technology from Manipal University Jaipur.

    I am here to grow as a developer with a set of like minded people

    Check me out at

    Portfolio: https://mayank0255.github.io/
    GitHub: https://github.com/Mayank0255
    Linkedin: https://www.linkedin.com/in/mayank-aggarwal-14301b168

    Didier Boivin
    @DidierBoivin
    Hi
    How to pass a geojson object with setState
    I have a message Error: Objects are not valid as a React child (found: object with keys {type, coordinates}). If you meant to render a collection of children, use an array instead.
    How can I fix it
    Thanks
    Devin
    @demitchell14
    Hello guys.. I have a pretty niche question I feel like for CRA development.
    I use the proxy feature of CRA to point to a domain, however, the IP attached to the domain changed, forcing me to change DNS. I know DNS takes a while to propagate, however, I know for a fact everything is propagated correctly because the website now works correctly everywhere, except when using it with the CRA proxy.
    I'm just curious if anyone knows of a way to reset http cache within NPM (or wherever this is stored, because I'm not entirely sure).
    Aaron Gray
    @AaronNGray
    Hi, I am new to React and have immediately came up with what looks like a very useful new feature. Polymorphic tag disaptch.
    import Article from "./Article";
    import Post from "./Post";
    
      const renderArticles = () => {
        return articles.map((article) => {
          return (
            <{article.type}
              article={article}
            />
          );
        });
      };
    const Article = ({ article }) => {
      return (
        <div className="article">
          <div className="article__image">
            <img src={article.image} alt="article thumbnail" />
          </div>
          <div className="article__content">
            <div className="article__title">{article.title}</div>
            <div className="article__info">
              {article.author} . {moment(new Date(article.date)).fromNow()}
            </div>
            <div className="article__body">{article.body}</div>
          </div>
        </div>
      );
    };
    const Post = ({ post }) => {
      return (
        <div className="post">
          ...
        </div>
      };
    };
    A tag of {article.type} will allow the article type to be chosen and rendered without having to use a restricted set of items dispatched using conditionals.
    React at present gives :-
    Aaron Gray
    @AaronNGray
    /src/components/Articles.js
    SyntaxError: C:\Users\aaron\GitHub\react-infinite-scrolling-final-solution\client-js\src\components\Articles.js: Unexpected token (53:9)
    
      51 |     return articles.map((article) => {
      52 |       return (
    > 53 |         <{article.type}
         |          ^
      54 |           article={article}
      55 |           key={article._id}
      56 |         />
    So its probably possible to alter the parser/lexer phase to deal with this and allow a substitution later in the compilation process.
    Aaron Gray
    @AaronNGray
    Ah sorry would only work with real Web Component archetecture as dispatch is at runtime, not compile time !
    Orange-Chemistry
    @Orange-Chemistry
    hi
    Sean Murphy
    @SeanFullstack
    Sadanand Akshay Pai
    @sadanandpai
    encryptblockr
    @encryptblockr

    how do i redirect to homepage after signout?

            <Route
                path="/signout"
                render={() => {
                  logout();
                  history.push('/');
                  return null;
                }}
            />

    i am getting error Uncaught TypeError: Cannot read property 'push' of undefined

    5 replies
    encryptblockr
    @encryptblockr
    this chat is dead
    encryptblockr
    @encryptblockr

    I am trying to setup verify account with react and have the following in my App.js file

    App.js

    ...
    ...
            <Route path='/verify-account?token=:token&email=:email' component={VerifyAccountPage} exact />
    ...
    ...

    and in my VerifyAccountPage component have the following

    import { Redirect } from 'react-router-dom';
    import { useHistory } from 'react-router';
    import { verifyAccount, isAuthenticated } from '../../utils/auth';
    
    
    const VerifyAccount = () => {
    
      const { token, email } = this.props.match.params
    ...
    ...

    but this is not working and when i go to the link https://mywebsite.com/verify-account?token=3heubek&email=user1@email.com nothing happens other than a 200 or 304 status code

    no request is sent to the API so means that the params are not getting pulled out

    can anyone point me to what is going on?

    Acoder-Ana
    @Acoder-Ana

    Hi developers
    We are Ukraine based IT startup and we are looking forward to hiring 2 (two) React.js developers in a few days.
    Recruitment process is simple.

    1. There is a small test project to get qualified.
    2. Once you have finished the task, you will be required to send your CV.

    If you are interested, DM me
    Regards.
    Andrei

    svimanet
    @svimanet:matrix.rongepaadl.com
    [m]
    Is it possible to have onFocus event not applied for click event (Input element)? In the case where i want tab-focusing and click-focusing to be different
    svimanet
    @svimanet:matrix.rongepaadl.com
    [m]

    :point_up: Edit: Is it possible to have onFocus event not applied for click event (Input element)? In the case where i want tab-focusing and click-focusing to be different

    Edit: firefox has attempted to solve this with a :focus-visual tag, but not all browsers support it. Made a hack with onClick and onKeyPress event using the same function to distinguish event type and sett appropriate class

    Alan Hemmings
    @goblinfactory
    Hi all, are there any decent replacements for npx create-react-app my-app that you can use to kickstart a small project with simple stuff like bootstrap theme, react-router, sidebar, navigation and few starter pages, decently laid out. I hate having to edit the starter site each time, I want to test something I've read about react, (use npx to start a new site, then delete svg logo and useless css, import bootstrap etc. Surely this is a solved problem? Can folk suggest a simple starter (boilerplate) starter replacement for npx create react-app that's dead simple use edit and use?
    Shingo OKAWA
    @ognis1205
    Hi all, this is my first attempt to implement realtime data-processing/search engine based on React/Next.js:
    https://github.com/ognis1205/mutad